> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Xbox 컴파일러 기술

> XBOX 컴파일러 기술

XBOX용 컴파일러는 Visual Studio와 함께 제공되는 Visual C++ x64 컴파일러입니다. Visual Studio 2022(17.12 또는 17.14) 또는 최신 Visual Studio 2026 업데이트를 사용하세요.

XBOX 개발은 Windows용 clang/LLVM v11 이상도 지원합니다. 이 도구 집합은 Visual C/C++ 런타임을 사용합니다. MSBuild를 사용하는 경우 Visual Studio 2019 또는 Visual Studio 2022 clang/LLVM 통합을 사용하세요.

다른 도구 집합과 런타임 조합은 실행되지 않거나 인증을 통과하지 못할 수 있습니다.

Visual C++ 코드 업그레이드에 대한 자세한 내용은 [Visual C++ 포팅 및 업그레이드 가이드](https://learn.microsoft.com/cpp/porting/visual-cpp-porting-and-upgrading-guide)를 참조하세요.

> [!NOTE]
>
> XBOX 도구는 디버깅 기호에 Microsoft 프로그램 데이터베이스(PDB) 파일만 사용합니다. LLVM `.ld` 파일이 내보내는 CodeView 또는 DWARF 디버깅 정보는 지원하지 않습니다.

## C++14, C++17 및 C++20 언어 버전 및 기능

Visual Studio 2019, Visual Studio 2022 및 Visual Studio 2026은 C++11, C++14 및 C++17을 지원합니다. Visual Studio 2022 및 Visual Studio 2026은 C++20도 지원합니다.

| 컴파일러 버전 | 버전 매크로 | 릴리스 | 참고 |
| - | - | - | - |
| 19.20 | \_MSC\_VER == 1920 | Visual Studio 2019(버전 16.0) | [Visual Studio 2019의 C++17/20 기능 및 수정 사항](https://devblogs.microsoft.com/cppblog/cpp17-20-features-and-fixes-in-vs-2019/) |
| 19.21 | \_MSC\_VER == 1921 | Visual Studio 2019(버전 16.1) | |
| 19.22 | \_MSC\_VER == 1922 | Visual Studio 2019(버전 16.2) | |
| 19.23 | \_MSC\_VER == 1923 | Visual Studio 2019(버전 16.3) | |
| 19.24 | \_MSC\_VER == 1924 | Visual Studio 2019(버전 16.4) | |
| 19.25 | \_MSC\_VER == 1925 | Visual Studio 2019(버전 16.5) | [C++20 모듈](https://devblogs.microsoft.com/cppblog/c-modules-conformance-improvements-with-msvc-in-visual-studio-2019-16-5/) |
| 19.26 | \_MSC\_VER == 1926 | Visual Studio 2019(버전 16.6) | [VS 2019 16.1\~16.6의 C++20 기능 및 수정 사항](https://devblogs.microsoft.com/cppblog/c20-features-and-fixes-in-vs-2019-16-1-through-16-6/) |
| 19.27 | \_MSC\_VER == 1927 | Visual Studio 2019(버전 16.7) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-167) |
| 19.28 | \_MSC\_VER == 1928 | Visual Studio 2019(버전 16.8) | [C++20 모듈](https://devblogs.microsoft.com/cppblog/standard-c20-modules-support-with-msvc-in-visual-studio-2019-version-16-8/)  [C++20 코루틴](https://devblogs.microsoft.com/cppblog/c-coroutines-in-visual-studio-2019-version-16-8/)  [C++20 언어 기능](https://devblogs.microsoft.com/cppblog/c20-features-in-visual-studio-2019-versions-16-7-and-16-8/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-168) |
| 19.28.29910 이상 | | Visual Studio 2019(버전 16.9) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-169) |
| 19.29 | \_MSC\_VER = 1929 | Visual Studio 2019(버전 16.10) | [C++20 범위](https://devblogs.microsoft.com/cppblog/c20-ranges-are-complete-in-visual-studio-2019-version-16-10/)  [\<format>](https://devblogs.microsoft.com/cppblog/format-in-visual-studio-2019-version-16-10/)  [\<chrono> 확장](https://devblogs.microsoft.com/cppblog/cpp20s-extensions-to-chrono-available-in-visual-studio-2019-version-16-10/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-1610) |
| 19.29.30133.0 이상 | | Visual Studio 2019(버전 16.11) | [C++20 코루틴](https://devblogs.microsoft.com/cppblog/cpp20-coroutine-improvements-in-visual-studio-2019-version-16-11/)  [STL 변경 정보](https://github.com/microsoft/STL/wiki/VS-2019-Changelog#vs-2019-161114)  [/std:c++20 스위치](https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/) |
| 19.30 | \_MSC\_VER == 1930 | Visual Studio 2022(17.0) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-170) |
| 19.31 | \_MSC\_VER == 1931 | Visual Studio 2022(17.1) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-171) |
| 19.32 | \_MSC\_VER == 1932 | Visual Studio 2022(17.2) | [MSVC의 STL, /std:c++20 완료](https://devblogs.microsoft.com/cppblog/msvcs-stl-completes-stdc20/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-172) |
| 19.33 | \_MSC\_VER = 1933 | Visual Studio 2022(17.3) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-173) |
| 19.34 | \_MSC\_VER = 1934 | Visual Studio 2022(17.4) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-174) |
| 19.35 | \_MSC\_VER = 1935 | Visual Studio 2022(17.5) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-175) |
| 19.36 | \_MSC\_VER = 1936 | Visual Studio 2022(17.6) | [vcpkg](https://devblogs.microsoft.com/cppblog/visual-studio-17-6-for-cpp-devs/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-176) |
| 19.37 | \_MSC\_VER = 1937 | Visual Studio 2022(17.7) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-177) |
| 19.38 | \_MSC\_VER = 1938 | Visual Studio 2022(17.8) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-178) |
| 19.39 | \_MSC\_VER = 1939 | Visual Studio 2022(17.9) | [MSVC 백 엔드 업데이트](https://devblogs.microsoft.com/cppblog/msvc-backend-updates-since-visual-studio-2022-version-17-3/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/VS-2022-Changelog#vs-2022-179) |
| 19.40 | \_MSC\_VER = 1940 | Visual Studio 2022(17.10) | [MSVC 도구 집합 부 버전](https://devblogs.microsoft.com/cppblog/msvc-toolset-minor-version-number-14-40-in-vs-2022-v17-10/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710) |
| 19.41 | \_MSC\_VER = 1941 | Visual Studio 2022(17.11) | [진단 변경 사항](https://devblogs.microsoft.com/cppblog/whats-new-for-cpp-developers-in-visual-studio-2022-17-11/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1711) |
| 19.42 | \_MSC\_VER = 1942 | Visual Studio 2022(17.12) | [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1712) |
| 19.43 | \_MSC\_VER = 1943 | Visual Studio 2022(17.13) | [C++ 언어 업데이트](https://devblogs.microsoft.com/cppblog/msvc-compiler-updates-in-visual-studio-2022-version-17-13/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1713) |
| 19.44 | \_MSC\_VER = 1944 | Visual Studio 2022(17.14) | [C++ 언어 업데이트](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-in-visual-studio-2022-17-14/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1714) |
| 19.50 | \_MSC\_VER = 1950 | Visual Studio 2026 | [C++ 언어 업데이트](https://devblogs.microsoft.com/cppblog/c-language-updates-in-msvc-build-tools-v14-50/)  [STL 기능 및 수정 사항](https://github.com/microsoft/STL/wiki/Changelog#msvc-build-tools-1450) |

## 내장 함수

Visual C++ 컴파일러는 x64 인라인 어셈블리를 지원하지 않지만, XBOX 개발을 위한 특수 명령 집합을 포함할 수 있도록 다양한 내장 함수를 지원합니다.

> [!NOTE]
>
> 내장 함수를 사용할 때는 대상 플랫폼이 해당 명령을 지원하는지 이미 확인했다고 가정합니다. 지원 여부를 확인하지 않으면 앱에서 런타임 `invalid instruction` 예외가 발생합니다. 특히 XBOX One(AMD Jaguar CPU)은 AVX 및 F16C를 지원하고, XBOX Series X|S(AMD Hercules CPU)는 AVX2 및 FMA3도 지원한다는 점에 유의하세요. 두 플랫폼 모두 AVX-512 이상의 명령은 지원하지 않습니다.

| 헤더 | 설명 |
| - | - |
| intrin.h | 일반 내장 함수, 특히 `__cpuid` 및 CRT 루틴의 다양한 내장 함수 형식입니다. ammintrin.h 및 immintrin.h를 포함합니다. |
| ammintrin.h | AMD 명령 집합: SSE5, FMA4 및 XOP 내장 함수입니다.   *FMA4 및 XOP는 XBOX One(AMD Jaguar CPU) 또는 XBOX Series X\|S(AMD Hercules CPU)에서 지원되지 않습니다*. |
| immintrin.h | Intel 명령 집합: [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions), AVX2, [BMI, BMI2](https://en.wikipedia.org/wiki/Bit_manipulation_instruction_set), [FMA3](https://en.wikipedia.org/wiki/FMA_instruction_set) 및 [F16C/CVT16](https://en.wikipedia.org/wiki/F16C) 내장 함수입니다.   *AVX2, BMI2 및 FMA3는 XBOX Series X\|S(AMD Hercules CPU)에서 지원되지만 XBOX One(AMD Jaguar CPU)에서는 지원되지 않습니다*. |
| xmmintrin.h | [SSE](https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions) 내장 함수 및 `__m128` 형식(단정밀도 부동 소수점 SIMD)입니다. |
| emmintrin.h | [SSE2](https://en.wikipedia.org/wiki/SSE2) 내장 함수 및 `__m128i` / `__m128d` 형식(배정밀도 부동 소수점 및 정수 SIMD)입니다. |
| pmmintrin.h | [SSE3](https://en.wikipedia.org/wiki/SSE3) 내장 함수(float/double 수평 덧셈 및 뺄셈 연산, 특정 "dup" 연산)입니다. |
| tmmintrin.h | [SSSE3](https://en.wikipedia.org/wiki/SSSE3) 내장 함수(추가 수평 연산, 정수 abs, SSE2를 보강하는 "byte" 셔플)입니다. |
| smmintrin.h | [SSE4.1](https://en.wikipedia.org/wiki/SSE4) 내장 함수(내적, 반올림, SSE2용 보강된 min/max 지원)입니다. |
| nmmintrin.h | SSE4.2 내장 함수입니다. |
| wmmintrin.h | AES 내장 함수입니다. |
| zmmintrin.h | AVX-512 내장 함수입니다.   *AVX-512 내장 함수는 XBOX One(AMD Jaguar CPU) 또는 XBOX Series X\|S(AMD Hercules CPU)에서 지원되지 않습니다*. |
| mmintrin.h | Intel MMX 내장 함수(`__m64` 형식 포함)로, x64 네이티브 애플리케이션에서는 지원되지 않습니다. |
| mm3dnow\.h | AMD 3DNow! 내장 함수로, x64 네이티브 애플리케이션에서는 지원되지 않습니다. *`_mm_prefetch` / `_m_prefetchw`는 x64 네이티브에서 지원되며 intrin.h에도 정의되어 있습니다.* |

> [!NOTE]
>
> Visual Studio는 **/arch:AVX** 및 **/arch:AVX2** 스위치를 지원하며, 이 스위치를 사용하면 AVX 명령 집합 표준의 일부인 [VEX 접두사](https://en.wikipedia.org/wiki/VEX_prefix)를 사용할 수 있습니다. 모든 XBOX 애플리케이션에 이 스위치를 사용하세요. 자세한 내용은 다음 문서를 참조하세요.

* [Microsoft Docs: x64 내장 함수](https://learn.microsoft.com/cpp/intrinsics/x64-amd64-intrinsics-list)

* [Intel: AVX](https://go.microsoft.com/fwlink/p/?LinkId=251202)

* [Games for Windows and the DirectX SDK 블로그: DirectXMath 시리즈](https://walbourn.github.io/directxmath-sse-sse2-and-arm-neon/)

### clang/LLVM 내장 함수

Windows용 clang/LLVM 도구 집합은 MSVC와 동일한 내장 함수를 다수 구현하지만, 몇 가지 주요 차이점이 있습니다.

* clang/LLVM 및 GNUC는 SSE SIMD 형식을 Visual C++ 및 Intel 컴파일러와 다르게 처리합니다. 특히 `__m128`, `__m128i` 및 `__m128d` 형식은 구조체가 아닌 불투명 형식이므로 이러한 형식을 사용하는 C++ 오버로드 함수를 만들 수 없습니다. 이 차이로 인해 `__m128.m128_f32[0]`을 통한 직접 요소 액세스도 clang/LLVM에서 컴파일되지 않습니다.

> 이러한 이유로 DirectXMath는 clang/LLVM을 사용하여 빌드할 때 `_XM_NO_XMVECTOR_OVERLOADS_`를 정의합니다. 이식성을 높이려면 코드에서 이 매크로를 명시적으로 정의하여 MSVC에도 적용할 수 있습니다.

* clang/LLVM용 *cpuid* 내장 함수는 특수 헤더 `#include <cpuid.h>`를 사용합니다. `__cpuid` 내장 함수는 다른 매개 변수 목록을 사용하며, `__cpuid_count`는 MSVC `__cpuidex`에 해당하지만 역시 매개 변수 목록이 다릅니다.

```
#if (defined(__clang__) || defined(__GNUC__)) && (__x86_64__ || __i386__)
#include <cpuid.h>
#else
#include <intrin.h>
#endif
```

```
int CPUInfo[4] = { -1 };
#if defined(__clang__) || defined(__GNUC__)
__cpuid(0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]);
#else
__cpuid(CPUInfo, 0);
#endif
```

```
#if defined(__clang__) || defined(__GNUC__)
__cpuid_count(7, 0, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]);
#else
__cpuidex(CPUInfo, 7, 0);
#endif
```

## 호출 규칙

x64 네이티브 코드의 기본 호출 규칙은 `__fastcall`이며, 자세한 내용은 [Microsoft Docs](https://learn.microsoft.com/cpp/build/x64-calling-convention)에 설명되어 있습니다. `__cdecl` 및 `__stdcall` 호출 규칙은 x64에서 `__fastcall`의 별칭일 뿐입니다.

MSVC 및 clang/LLVM 컴파일러는 x86 및 x64 코드에 대해 `__vectorcall` 호출 규칙을 지원합니다. 자세한 내용은
[Visual C++ 팀 블로그: 'Vector Calling Convention' 소개](https://devblogs.microsoft.com/cppblog/introducing-vector-calling-convention/) 및 [Microsoft Docs](https://learn.microsoft.com/cpp/cpp/vectorcall)를 참조하세요.

## 자동 벡터라이저 및 자동 병렬화 도구

Visual C++ 최적화 프로그램은 자동 벡터라이저를 통해 스칼라 정수 또는 부동 소수점 계산을 SIMD 명령으로 변경할 수 있습니다. 자동 벡터라이저는 `/O2` 또는 `/Ox`를 사용하면 자동으로 사용하도록 설정됩니다. `#pragma loop(no_vector)`를 사용하여 특정 루프에 대해 사용하지 않도록 설정할 수 있습니다.

이러한 컴파일러 도구 집합은 스레드를 사용한 루프 자동 병렬화도 지원합니다. `/Qpar`를 사용하여 자동 병렬화를 사용하도록 설정합니다. `#pragma (loop(hint_parallel(n)))`을 사용하여 특정 루프에 대한 힌트를 제공할 수 있습니다. 자세한 내용은 다음 문서를 참조하세요.

* [자동 병렬화 및 자동 벡터화](https://learn.microsoft.com/cpp/parallel/auto-parallelization-and-auto-vectorization)

## 버그 보고

**Visual C++ 컴파일러**의 버그는 가능하면 Visual Studio의 *문제 보고...* 를 통해 보고하세요. [Microsoft Docs](https://learn.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio) 및 [개발자 커뮤니티](https://aka.ms/feedback/report?space=62) 웹 사이트를 참조하세요. 컴파일러에 대한 좋은 버그 보고서를 작성하는 방법에 대한 자세한 내용은 [이 페이지](https://aka.ms/compilerbug)를 참조하세요.

> [!NOTE]
>
> 문제를 재현하는 데 추가 NDA 정보가 필요한 경우 공개 보고 문제에 "Microsoft 전용"으로 표시된 댓글을 추가할 수 있습니다.

**Windows용 clang/LLVM 컴파일러**의 버그 보고는 [https://bugs.llvm.org/](https://bugs.llvm.org/) 를 사용하세요.

**Microsoft 표준 C++ 라이브러리**(STL이라고도 함)의 버그 보고는 [https://github.com/microsoft/STL/issues](https://github.com/microsoft/STL/issues) 를 사용하세요.

언제나처럼 에스컬레이션이 필요한 중요한 문제는 *계정 관리자*에게 언제든지 문의하세요.

## 리소스

* [AMD 개발자 가이드 및 설명서](https://developer.amd.com/resources/developer-guides-manuals/)

* [Intel 64 및 IA-32 아키텍처 소프트웨어 개발자 설명서](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html)

* [Visual Studio의 Visual C++ 새로운 기능](https://learn.microsoft.com/cpp/what-s-new-for-visual-cpp-in-visual-studio)


## Related topics

- [콘솔 개발을 위한 Visual Studio](/ko/tools/tools-console/visualstudio/visualstudio.md)
- [Visualstudio](/ko/tools/tools-console/visualstudio/index.md)
- [Visual C++ 컴파일러 리소스](/ko/tools/tools-console/visualstudio/compiler-resources.md)
- [Visual C++ 컴파일러 및 링커 스위치 권장 사항](/ko/tools/tools-console/visualstudio/compiler-switch-recommendations.md)
- [XBOX GDK용 HLSL 셰이더 컴파일러 (DXC)](/ko/tools/tools-console/shadercompiler/index.md)
