Skip to content

Commit 4bf5002

Browse files
TylerMSFTTylerMSFT
authored andcommitted
tech review
1 parent 63be6b9 commit 4bf5002

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

docs/build/reference/arch-arm64.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ You can specify an ARM64 extension from Armv8.0-A through Armv8.9-A, and Armv9.0
2929
3030
The `_M_ARM64` macro is defined by default when compiling for an ARM64 target. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md)\
3131

32-
The `__ARM_ARCH` macro is defined for `/arch:ARMv8.0` and higher. It indicates the ARM architecture extension level that the compiler is targeting. For example:
32+
The `__ARM_ARCH` macro is defined for `/arch:ARMv8.0` and higher. It indicates the ARM architecture extension level that the compiler is targeting. For more information, see [Predefined macros](../../preprocessor/predefined-macros.md).
3333

3434
```cpp
35-
// test.cpp
36-
int main()
37-
{
38-
#if __ARM_ARCH >= 802
39-
// code that requires ARMv8.2...
40-
#endif
41-
}
35+
#if __ARM_ARCH >= 802
36+
// code that requires ARMv8.2...
37+
#endif
4238
```
4339

4440
**`/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.

docs/preprocessor/predefined-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The compiler supports these predefined macros specified by the ISO C99, C11, C17
6565

6666
MSVC supports other predefined macros:
6767

68-
- `__ARM_ARCH` Defined as an integer literal that represents the ARM architecture version. The value is defined as 8 for the Armv8-A architecture. For 8.1 and onwards, the value is scaled to include minor versions such as X.Y using the formula X * 100 + Y. For example, for Armv8.1, `__ARM_ARCH` is 8 * 100 + 1 or 801. To set the ARM architecture version, see [`/arch`](../build/reference/arch-arm.md). This macro was introduced in Visual Studio 2022 version 17.10. For more information about this macro, see [ARM C Language Extensions](https://arm-software.github.io/acle/main/acle.html#markdown-toc-arm-architecture-level).
68+
- `__ARM_ARCH` Defined as an integer literal that represents the ARM architecture version. The value is defined as 8 for the Armv8-A architecture. For 8.1 and onwards, the value is scaled to include minor versions such as X.Y using the formula X * 100 + Y as defined by the ARM C language extension. For example, for Armv8.1, `__ARM_ARCH` is 8 * 100 + 1 or 801. To set the ARM architecture version, see [`/arch (ARM64)`](../build/reference/arch-arm64.md). This macro was introduced in Visual Studio 2022 version 17.10.
6969

7070
- `__ATOM__` Defined as 1 when the [`/favor:ATOM`](../build/reference/favor-optimize-for-architecture-specifics.md) compiler option is set and the compiler target is x86 or x64. Otherwise, undefined.
7171

0 commit comments

Comments
 (0)