Skip to content

Commit 7d20539

Browse files
authored
Merge pull request #4018 from MicrosoftDocs/main637922928957043393
Repo sync for protected CLA branch
2 parents 4c52a71 + f934a20 commit 7d20539

15 files changed

+312
-213
lines changed

docs/build/reference/arch-arm.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
11
---
22
description: "Learn more about: /arch (ARM)"
33
title: "/arch (ARM)"
4-
ms.date: "11/04/2016"
5-
ms.assetid: 4f1406ff-f174-487c-a126-8ab06cf447c1
4+
ms.date: 07/01/2022
65
---
7-
# /arch (ARM)
6+
# `/arch` (ARM)
87

9-
Specifies the architecture for code generation on ARM. See also [/arch (x86)](arch-x86.md) and [/arch (x64)](arch-x64.md).
8+
Specifies the architecture for code generation on ARM. For more information on **`/arch`** for other target architectures, see [`/arch` (ARM64)](arch-arm64.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (x86)](arch-x86.md)
109

1110
## Syntax
1211

13-
```
14-
/arch:[ARMv7VE|VFPv4]
15-
```
12+
> **`/arch:`**\[**`ARMv7VE`**|**`VFPv4`**]
1613
1714
## Arguments
1815

19-
**/arch:ARMv7VE**<br/>
16+
**`/arch:ARMv7VE`**\
2017
Enables the use of ARMv7VE Virtualization Extensions instructions.
2118

22-
**/arch:VFPv4**<br/>
23-
Enables the use of ARM VFPv4 instructions. If this option is not specified, VFPv3 is the default.
19+
**`/arch:VFPv4`**\
20+
Enables the use of ARM VFPv4 instructions. If this option isn't specified, VFPv3 is the default.
2421

2522
## Remarks
2623

27-
The `_M_ARM_FP` macro (for ARM only) indicates which, if any, **/arch** compiler option was used. For more information, see [Predefined Macros](../../preprocessor/predefined-macros.md).
24+
The `_M_ARM_FP` macro (for ARM only) indicates which, if any, **`/arch`** compiler option was used. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md).
2825

29-
When you use [/clr](clr-common-language-runtime-compilation.md) to compile, **/arch** has no effect on code generation for managed functions. **/arch** only affects code generation for native functions.
26+
When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions. **`/arch`** only affects code generation for native functions.
3027

31-
### To set the /arch:ARMv7VE or /arch:VFPv4 compiler option in Visual Studio
28+
### To set the `/arch:ARMv7VE` or `/arch:VFPv4` compiler option in Visual Studio
3229

3330
1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
3431

@@ -42,6 +39,6 @@ When you use [/clr](clr-common-language-runtime-compilation.md) to compile, **/a
4239

4340
## See also
4441

45-
[/arch (Minimum CPU Architecture)](arch-minimum-cpu-architecture.md)<br/>
46-
[MSVC Compiler Options](compiler-options.md)<br/>
47-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
42+
[`/arch` (Minimum CPU architecture)](arch-minimum-cpu-architecture.md)\
43+
[MSVC compiler options](compiler-options.md)\
44+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

docs/build/reference/arch-arm64.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: "Learn more about: /arch (ARM64)"
3+
title: "/arch (ARM64)"
4+
ms.date: 06/30/2022
5+
---
6+
# `/arch` (ARM64)
7+
8+
Specifies the architecture for code generation on ARM64. For more information on **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md).
9+
10+
## Syntax
11+
12+
> **`/arch:`**\[**`armv8.0`**|**`armv8.8`**]
13+
14+
## Arguments
15+
16+
**`/arch:armv8.0`** or **`/arch:armv8.8`**\
17+
Optional. Specifies minimum CPU extension requirements for ARMv8.x-A. The default is **`/arch:armv8.0`**.
18+
19+
## Remarks
20+
21+
The `_M_ARM64` macro is defined by default when compiling for an ARM64 target. For more information, see [Predefined Macros](../../preprocessor/predefined-macros.md).
22+
23+
When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions. **`/arch`** only affects code generation for native functions.
24+
25+
### To set the `/arch` compiler option in Visual Studio
26+
27+
1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
28+
29+
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
30+
31+
1. In the **Additional options** box, add *`/arch:armv8.0`* or *`/arch:armv8.8`*. Choose **OK** to save your changes.
32+
33+
### To set this compiler option programmatically
34+
35+
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.
36+
37+
## See also
38+
39+
[`/arch` (Minimum CPU architecture)](arch-minimum-cpu-architecture.md)\
40+
[MSVC compiler options](compiler-options.md)\
41+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
22
description: "Learn more about: /arch (Minimum CPU Architecture)"
33
title: "/arch (Minimum CPU Architecture)"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/30/2022
55
f1_keywords: ["VC.Project.VCCLCompilerTool.EnableEnhancedInstructionSet", "/arch"]
66
helpviewer_keywords: ["-arch compiler option [C++]", "/arch compiler option [C++]", "arch compiler option [C++]"]
7-
ms.assetid: cc17da15-47bd-4e74-b905-4e73c3bdb8a0
87
---
9-
# /arch (Minimum CPU Architecture)
8+
# `/arch` (Minimum CPU Architecture)
109

11-
The architecture options specify the architecture for code generation. Select the base hardware architecture you are working with to see /arch options for that target platform.
10+
The architecture options specify the architecture for code generation. Select the base hardware architecture you're working with to see **`/arch`** options for that target platform.
1211

13-
- [/arch (x86)](arch-x86.md)
12+
- [`/arch (x86`)](arch-x86.md)
1413

15-
- [/arch (x64)](arch-x64.md)
14+
- [`/arch (x64)`](arch-x64.md)
1615

17-
- [/arch (ARM)](arch-arm.md)
16+
- [`/arch (ARM)`](arch-arm.md)
17+
18+
- [`/arch (ARM64)`](arch-arm64.md)
1819

1920
## See also
2021

21-
[MSVC Compiler Options](compiler-options.md)<br/>
22-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
22+
[MSVC compiler options](compiler-options.md)\
23+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

docs/build/reference/arch-x64.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,49 @@
11
---
22
description: "Learn more about: /arch (x64)"
33
title: "/arch (x64)"
4-
ms.date: "10/01/2019"
4+
ms.date: 06/30/2022
55
ms.assetid: ecda22bf-5bed-43f4-99fb-88aedd83d9d8
66
---
7-
# /arch (x64)
7+
# `/arch` (x64)
88

9-
Specifies the architecture for code generation on x64. Also see [/arch (x86)](arch-x86.md) and [/arch (ARM)](arch-arm.md).
9+
Specifies the architecture for code generation on x64. For more information on **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (ARM64)](arch-arm64.md), and [`/arch` (ARM)](arch-arm.md).
1010

1111
## Syntax
1212

13-
```
14-
/arch:[AVX|AVX2|AVX512]
15-
```
13+
> **`/arch:`**\[**`AVX`**|**`AVX2`**|**`AVX512`**]
1614
1715
## Arguments
1816

19-
**/arch:AVX**<br/>
17+
**`/arch:AVX`**\
2018
Enables the use of Intel Advanced Vector Extensions instructions.
2119

22-
**/arch:AVX2**<br/>
20+
**`/arch:AVX2`**\
2321
Enables the use of Intel Advanced Vector Extensions 2 instructions.
2422

25-
**/arch:AVX512**<br/>
23+
**`/arch:AVX512`**\
2624
Enables the use of Intel Advanced Vector Extensions 512 instructions.
2725

2826
## Remarks
2927

30-
The **/arch** option enables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support additional extensions over those supported by older processors, although you should consult the documentation for a particular processor or test for instruction set extension support using [__cpuid](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension.
28+
The **`/arch`** option enables the use of certain instruction set extensions, particularly for vector calculation, available in processors from Intel and AMD. In general, more recently introduced processors may support extensions beyond the ones supported by older processors, although you should consult the documentation for a particular processor or test for instruction set extension support using [`__cpuid`](../../intrinsics/cpuid-cpuidex.md) before executing code using an instruction set extension.
3129

32-
**/arch** only affects code generation for native functions. When you use [/clr](clr-common-language-runtime-compilation.md) to compile, **/arch** has no effect on code generation for managed functions.
30+
**`/arch`** only affects code generation for native functions. When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions.
3331

3432
The processor extensions have the following characteristics:
3533

36-
- The default mode uses SSE2 instructions for scalar floating-point and vector calculations. These instructions allow calculation with 128-bit vectors of single-precision, double-precision and 1, 2, 4 or 8 byte integer values, as well as single-precision and double-precision scalar floating-point values.
34+
- The default mode uses SSE2 instructions for scalar floating-point and vector calculations. These instructions allow calculation with 128-bit vectors of single-precision, double-precision and 1, 2, 4 or 8-byte integer values, as well as single-precision and double-precision scalar floating-point values.
3735

38-
- **AVX** introduced an alternative instruction encoding for vector and floating-point scalar instructions that allows vectors of either 128 bits or 256 bits, and zero-extends all vector results to the full vector size. (For legacy compatibility, SSE-style vector instructions preserve all bits beyond bit 127.) Most floating-point operations are extended to 256 bits.
36+
- **`AVX`** introduced an alternative instruction encoding for vector and floating-point scalar instructions. It allows vectors of either 128 bits or 256 bits, and zero-extends all vector results to the full vector size. (For legacy compatibility, SSE-style vector instructions preserve all bits beyond bit 127.) Most floating-point operations are extended to 256 bits.
3937

40-
- **AVX2** extends most integer operations to 256-bit vectors and enables use of Fused Multiply-Add (FMA) instructions.
38+
- **`AVX2`** extends most integer operations to 256-bit vectors and enables use of Fused Multiply-Add (FMA) instructions.
4139

42-
- **AVX-512** introduced another instruction encoding form that allows 512-bit vectors, plus certain other optional features. Instructions for additional operations were also added.
40+
- **`AVX-512`** introduced another instruction encoding form that allows 512-bit vectors, plus certain other optional features. Instructions for other operations were also added.
4341

44-
Each **/arch** option may also enable the use of other non-vector instructions that are associated with that option. An example is the use of certain BMI instructions when **/arch:AVX2** is specified.
42+
Each **`/arch`** option may also enable the use of other non-vector instructions that are associated with that option. An example is the use of certain BMI instructions when **`/arch:AVX2`** is specified.
4543

46-
The `__AVX__` preprocessor symbol is defined when the **/arch:AVX**, **/arch:AVX2** or **/arch:AVX512** compiler option is specified. The `__AVX2__` preprocessor symbol is defined when the **/arch:AVX2** or **/arch:AVX512** compiler option is specified. The `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__` and `__AVX512VL__` preprocessor symbols are defined when the **/arch:AVX512** compiler option is specified. For more information, see [Predefined Macros](../../preprocessor/predefined-macros.md). The **/arch:AVX2** option was introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. Limited support for **/arch:AVX512** was added in Visual Studio 2017, and expanded in Visual Studio 2019.
44+
The `__AVX__` preprocessor symbol is defined when the **`/arch:AVX`**, **`/arch:AVX2`** or **`/arch:AVX512`** compiler option is specified. The `__AVX2__` preprocessor symbol is defined when the **`/arch:AVX2`** or **`/arch:AVX512`** compiler option is specified. The `__AVX512F__`, `__AVX512CD__`, `__AVX512BW__`, `__AVX512DQ__` and `__AVX512VL__` preprocessor symbols are defined when the **`/arch:AVX512`** compiler option is specified. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md). The **`/arch:AVX2`** option was introduced in Visual Studio 2013 Update 2, version 12.0.34567.1. Limited support for **`/arch:AVX512`** was added in Visual Studio 2017, and expanded in Visual Studio 2019.
4745

48-
### To set the /arch:AVX, /arch:AVX2 or /arch:AVX512 compiler option in Visual Studio
46+
### To set the `/arch:AVX`, `/arch:AVX2` or `/arch:AVX512` compiler option in Visual Studio
4947

5048
1. Open the **Property Pages** dialog box for the project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
5149

@@ -59,6 +57,6 @@ The `__AVX__` preprocessor symbol is defined when the **/arch:AVX**, **/arch:AVX
5957

6058
## See also
6159

62-
[/arch (Minimum CPU Architecture)](arch-minimum-cpu-architecture.md)<br/>
63-
[MSVC Compiler Options](compiler-options.md)<br/>
64-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
60+
[`/arch` (Minimum CPU Architecture)](arch-minimum-cpu-architecture.md)\
61+
[MSVC compiler options](compiler-options.md)\
62+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

0 commit comments

Comments
 (0)