Skip to content

Commit 7824663

Browse files
TylerMSFTTylerMSFT
authored andcommitted
tech review
1 parent 6ac46cd commit 7824663

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/build/reference/volatile.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
description: "Learn more about: /volatilemetadata"
33
title: "/volatilemetadata (Generate metadata on volatile memory accesses)"
4-
ms.date: 5/28/2024
4+
ms.date: 5/29/2024
55
f1_keywords: ["/volatilemetadata"]
66
helpviewer_keywords: ["/volatilemetadata", "-volatilemetadata compiler option", "/volatilemetadata compiler option", "volatilemetadata"]
77
---
88
# `/volatilemetadata` (Generate metadata on volatile memory accesses)
99

10-
Generate metadata on volatile memory accesses to improve performance when running x64 code on ARM.
10+
Generate metadata for volatile memory accesses to improve performance when running x64 code on ARM64.
1111

1212
## Syntax
1313

@@ -18,13 +18,15 @@ Generate metadata on volatile memory accesses to improve performance when runnin
1818
## Arguments
1919

2020
**`-`**\
21-
Turns off `/volatileMetadata`. This may result in worse performance when your code runs in emulation mode on ARM because the emulator pessimistically assumes that every load/store needs a barrier.
21+
Turns off `/volatileMetadata`. This may result in worse performance when your code runs in emulation mode on ARM64 because the emulator pessimistically assumes that every load/store needs a barrier.
2222

2323
## Remarks
2424

25-
Starting with Visual Studio 2019 16.10, `/volatileMetadata` is on by default when generating x64 code. It improves the emulation performance of x64 code on ARM by generating metadata that identifies volatile memory addresses. An emulator can use this metadata improve performance by not using acquire/release semantics on accesses it knows aren't volatile. Without this metadata, the emulator assumes that all addresses are volatile, and uses acquire and release semantics to access them.
25+
Starting with Visual Studio 2019 16.10, `/volatileMetadata` is on by default when generating x64 code. It improves the emulation performance of x64 code on ARM64 by generating metadata that identifies volatile memory addresses. An emulator can use this metadata to improve performance by not using acquire/release semantics on those accesses it knows aren't volatile. Without this metadata, the emulator assumes that all addresses are volatile and uses acquire and release semantics.
2626

27-
One side effect `/volatileMetadata` is you may see `npad` macros in the generated code. This macro expands to a specified number of `NOP` instructions that create an address to associate with the memory barrier. That address is then recorded in the metadata.
27+
One side effect of `/volatileMetadata` is you may see `npad` macros in the generated code. This macro expands to a specified number of `NOP` instructions that create an address to associate with a memory barrier. That address is then recorded in the metadata to indicate that acquire/release semantics should be used to access it.
28+
29+
`/volatileMetadata` is ignored when targeting x86.
2830

2931
`/volatileMetadata` can be disabled by using `/volatileMetadata-`.
3032

0 commit comments

Comments
 (0)