Skip to content

Commit 82509e0

Browse files
Merge pull request #5898 from MicrosoftDocs/main639075548681458080sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 83abf2c + af3567b commit 82509e0

File tree

6 files changed

+81
-32
lines changed

6 files changed

+81
-32
lines changed

docs/build/run-time-library-behavior.md

Lines changed: 73 additions & 27 deletions
Large diffs are not rendered by default.

docs/build/x64-calling-convention.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ ms.topic: concept-article
88

99
This article describes the standard processes and conventions that one function (the caller) uses to make calls into another function (the callee) in x64 code.
1010

11-
For more information about the `__vectorcall` calling convention, see [__vectorcall](../cpp/vectorcall.md).
11+
For more information about the `__vectorcall` calling convention, see [__vectorcall](../cpp/vectorcall.md).
12+
For more information about the `__preserve_none` calling convention, see [__preserve_none](../cpp/preserve-none.md).
1213

1314
## Calling convention defaults
1415

docs/cpp/preserve-none.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ The following list shows the behavior of this calling convention.
2121
| Element | Behavior |
2222
|---------|----------------|
2323
| Argument-passing order | Arguments are passed in up to 10 registers in the following order: `r13`, `r14`, `r15`, `rbx`, `rsi`, `rdi`, `r9`, `r8`, `rdx`, `rcx`. If a hidden parameter is required for struct returns, it's passed in `r13` (the first parameter register), reducing available parameter registers to 9. Registers `r10`-`r12` are reserved for various CRT and Windows runtimes. All parameters must be passed through registers; stack-based parameters aren't currently supported. |
24-
| Register allocation strategy | To help minimize register spilling, the allocator assigns `r9`, `r8`, `rdx`, and `rcx` only after other registers have been used. |
24+
| Register allocation strategy | To help minimize register spilling when calling functions with different calling conventions, the allocator assigns `rcx`, `rdx`, `r8`, and `r9` only after other registers have been used, since those registers are used first by the [__vectorcall](vectorcall.md) and [__cdecl](cdecl.md) calling conventions. |
2525
| Argument limit | Functions are restricted to a maximum of 10 parameters. An error is generated if this limit is exceeded. |
2626
| Return value convention | Follows the regular x64 calling convention rules. Scalar return values are returned in `rax`. Structs of size 1, 2, 4, or 8 bytes are returned through the `rax` register. For structs of other sizes, a pointer to memory allocated by the caller and passed through the hidden parameter is returned in `rax`. |
27-
| Volatile registers | All general-purpose registers except `rsp` (stack pointer) and `rbp` (base pointer) are treated as volatile and don't need to be preserved across function calls. While `r10` and `r11` are volatile, they aren't used for parameter passing to maintain compatibility with existing programs. |
27+
| Volatile registers | All general-purpose registers except `r12`, `rsp` (stack pointer) and `rbp` (base pointer) are treated as volatile and don't need to be preserved across function calls. While `r10` and `r11` are volatile, they aren't used for parameter passing to maintain compatibility with existing programs. |
2828
| Nonvolatile registers | Only `rsp`, `rbp`, and `r12` are nonvolatile. |
2929
| Stack alignment | The stack must maintain 16-byte alignment. |
3030
| Frame pointer | The `rbp` register and frame chain follow the [/Gy switch](../build/reference/gy-enable-function-level-linking.md) settings. |

docs/docfx.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"ROBOTS": "INDEX,FOLLOW",
4343
"manager": "coxford",
4444
"ms.date": "11/16/2016",
45-
"ms.topic": "article",
45+
"ms.topic": "concept-article",
4646
"audience": "developer",
4747
"ms.service": "visual-cpp",
4848
"ms.tgt_pltfrm": "Windows",
@@ -116,7 +116,7 @@
116116
"intrinsics/**.md": "reference",
117117
"mfc/reference/**.md": "reference",
118118
"overview/**.md": "overview",
119-
"parallel/**.md": "reference",
119+
"parallel/**.md": "how-to",
120120
"preprocessor/**.md": "reference",
121121
"safeint/**.md": "reference",
122122
"sanitizers/**.md": "reference",

docs/sanitizers/asan-building.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "MSVC AddressSanitizer language, build, and debugging reference"
33
description: "Technical description of building for the MSVC AddressSanitizer"
44
ms.date: 02/05/2024
5+
ms.topic: overview
56
f1_keywords: ["__SANITIZE_ADDRESS__", "ASAN_VCASAN_DEBUGGING"]
67
helpviewer_keywords: ["ASan reference", "MSVC AddressSanitizer reference", "MSVC Address Sanitizer reference"]
78
---

docs/sanitizers/asan.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "AddressSanitizer"
33
description: "Top-level description of the AddressSanitizer feature for Microsoft C/C++."
44
ms.date: 09/06/2024
5+
ms.topic: overview
56
f1_keywords: ["AddressSanitizer"]
67
helpviewer_keywords: ["ASan", "AddressSanitizer", "Address Sanitizer", "compiling for AddressSanitizer"]
78
---

0 commit comments

Comments
 (0)