Skip to content

Commit ac5c04b

Browse files
authored
Merge pull request #1891 from MicrosoftDocs/master
3/29/2019 AM Publish
2 parents 309dc53 + bbaffc2 commit ac5c04b

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

docs/build/arm64-windows-abi-conventions.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -181,27 +181,21 @@ Integral values are returned in x0.
181181

182182
Floating-point values are returned in s0/d0/v0 as appropriate.
183183

184-
Types returned by value are handled differently depending on whether they have certain properties.
184+
Types returned by value are handled differently depending on whether they have certain properties. Types which have all of these properties,
185185

186-
Types are given a "C" return style if they are aggregate by the C++14 standard definition. That is,
186+
- they're *aggregate* by the C++14 standard definition, that is, they have no user-provided constructors, no private or protected non-static data members, no base classes, and no virtual functions, and
187+
- they have a trivial copy-assignment operator, and
188+
- they have a trivial destructor,
187189

188-
- they have no user-provided constructors, no private or protected non-static data members, no base classes, and no virtual functions,
189-
- they have a trivial copy constructor, and
190-
- they have a trivial destructor.
190+
use the following return style:
191191

192-
All other types are given a "C++" return style.
192+
- Types less than or equal to 8 bytes are returned in x0.
193+
- Types less than or equal to 16 bytes are returned in x0 and x1, with x0 containing the lower-order 8 bytes.
194+
- For types greater than 16 bytes, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x8. The callee may modify the result memory block at any point during the execution of the subroutine. The callee isn't required to preserve the value stored in x8.
193195

194-
### C return style
196+
All other types use this convention:
195197

196-
Types less than or equal to 8 bytes are returned in x0.
197-
198-
Types less than or equal to 16 bytes are returned in x0 and x1, with x0 containing the lower-order 8 bytes.
199-
200-
For types greater than 16 bytes, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x8. The callee may modify the result memory block at any point during the execution of the subroutine. The callee isn't required to preserve the value stored in x8.
201-
202-
### C++ return style
203-
204-
The caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x0, or x1 if $this is passed in x0. The callee may modify the result memory block at any point during the execution of the subroutine. The callee returns the address of the memory block in x0.
198+
- The caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x0, or x1 if $this is passed in x0. The callee may modify the result memory block at any point during the execution of the subroutine. The callee returns the address of the memory block in x0.
205199

206200
## Stack
207201

0 commit comments

Comments
 (0)