Skip to content

Commit 7881fe1

Browse files
Merge pull request #6168 from MicrosoftDocs/main
Auto Publish – main to live - 2025-11-25 06:00 UTC
2 parents e79ab35 + b87b7c3 commit 7881fe1

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

docs/build/x64-calling-convention.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Prologs and epilogs are highly restricted so that they can be properly described
3434

3535
## Parameter passing
3636

37-
By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments get pushed on the stack in right-to-left order. All arguments passed on the stack are 8-byte aligned.
37+
By default, the x64 calling convention passes the first four arguments to a function in registers. The registers used for these arguments depend on the position and type of the argument. Remaining arguments are passed on the stack in right-to-left order. The caller reserves the required stack space and writes these arguments to stack memory using store or move instructions, maintaining 8-byte alignment for each argument.
3838

3939
Integer valued arguments in the leftmost four positions are passed in left-to-right order in RCX, RDX, R8, and R9, respectively. The fifth and higher arguments are passed on the stack as previously described. All integer arguments in registers are right-justified, so the callee can ignore the upper bits of the register and access only the portion of the register necessary.
4040

@@ -60,29 +60,29 @@ The following table summarizes how parameters are passed, by type and position f
6060

6161
```cpp
6262
func1(int a, int b, int c, int d, int e, int f);
63-
// a in RCX, b in RDX, c in R8, d in R9, f then e pushed on stack
63+
// a in RCX, b in RDX, c in R8, d in R9, f then e passed on stack
6464
```
6565
6666
### Example of argument passing 2 - all floats
6767
6868
```cpp
6969
func2(float a, double b, float c, double d, float e, float f);
70-
// a in XMM0, b in XMM1, c in XMM2, d in XMM3, f then e pushed on stack
70+
// a in XMM0, b in XMM1, c in XMM2, d in XMM3, f then e passed on stack
7171
```
7272

7373
### Example of argument passing 3 - mixed ints and floats
7474

7575
```cpp
7676
func3(int a, double b, int c, float d, int e, float f);
77-
// a in RCX, b in XMM1, c in R8, d in XMM3, f then e pushed on stack
77+
// a in RCX, b in XMM1, c in R8, d in XMM3, f then e passed on stack
7878
```
7979
8080
### Example of argument passing 4 - `__m64`, `__m128`, and aggregates
8181
8282
```cpp
8383
func4(__m64 a, __m128 b, struct c, float d, __m128 e, __m128 f);
8484
// a in RCX, ptr to b in RDX, ptr to c in R8, d in XMM3,
85-
// ptr to f pushed on stack, then ptr to e pushed on stack
85+
// ptr to f passed on stack, then ptr to e passed on stack
8686
```
8787

8888
## Varargs
@@ -112,7 +112,7 @@ These examples show how parameters and return values are passed for functions wi
112112

113113
```cpp
114114
__int64 func1(int a, float b, int c, int d, int e);
115-
// Caller passes a in RCX, b in XMM1, c in R8, d in R9, e pushed on stack,
115+
// Caller passes a in RCX, b in XMM1, c in R8, d in R9, e passed on stack,
116116
// callee returns __int64 result in RAX.
117117
```
118118
@@ -132,7 +132,7 @@ struct Struct1 {
132132
};
133133
Struct1 func3(int a, double b, int c, float d);
134134
// Caller allocates memory for Struct1 returned and passes pointer in RCX,
135-
// a in RDX, b in XMM2, c in R9, d pushed on the stack;
135+
// a in RDX, b in XMM2, c in R9, d passed on the stack;
136136
// callee returns pointer to Struct1 result in RAX.
137137
```
138138

docs/error-messages/tool-errors/vectorizer-and-parallelizer-messages.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ The 5*xx* reason codes apply to both the parallelizer and the vectorizer.
3030

3131
| Reason code | Explanation |
3232
|--|--|
33-
| 500 | A generic message that covers several cases: For example, the loop includes multiple exits, or the loop header doesn't end by incrementing the induction variable. |
33+
| 500 | Induction variable discovery or recurrence failure. |
3434
| 501 | Induction variable isn't local; or upper bound isn't loop-invariant. |
3535
| 502 | Induction variable is stepped in some manner other than a simple +1. |
3636
| 503 | Loop includes exception-handling or switch statements. |
3737
| 504 | Loop body may throw an exception that requires destruction of a C++ object. |
3838
| 505 | Outer loop has a pre-incremented induction variable. Exiting analysis. |
39+
| 506 | Loop structural or canonical form failure. |
40+
| 507 | Bounds, initialization, termination, or compare consistency failure. |
41+
| 508 | Stride derivation or usage failure |
42+
| 509 | Loop direction acceptability failure. |
3943

4044
```cpp
4145
void code_500(int *A)

0 commit comments

Comments
 (0)