Skip to content

Commit 756dd42

Browse files
author
Colin Robertson
committed
Update intrinsics content
1 parent b84fad6 commit 756dd42

100 files changed

Lines changed: 826 additions & 768 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/intrinsics/addfsbyte-addfsword-addfsdword.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Add a value to a memory location specified by an offset relative to the beginnin
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
void __addfsbyte(
1818
unsigned long Offset,
1919
unsigned char Data
@@ -28,12 +28,12 @@ void __addfsdword(
2828
);
2929
```
3030

31-
#### Parameters
31+
### Parameters
3232

33-
*Offset*<br/>
33+
*Offset*\
3434
[in] The offset from the beginning of `FS`.
3535

36-
*Data*<br/>
36+
*Data*\
3737
[in] The value to add to the memory location.
3838

3939
## Requirements
@@ -44,6 +44,8 @@ void __addfsdword(
4444
|`__addfsword`|x86|
4545
|`__addfsdword`|x86|
4646

47+
**Header file** \<intrin.h>
48+
4749
## Remarks
4850

4951
These routines are available only as intrinsics.
@@ -52,7 +54,7 @@ These routines are available only as intrinsics.
5254

5355
## See also
5456

55-
[__incfsbyte, \__incfsword, \__incfsdword](../intrinsics/incfsbyte-incfsword-incfsdword.md)<br/>
56-
[__readfsbyte, \__readfsdword, \__readfsqword, \__readfsword](../intrinsics/readfsbyte-readfsdword-readfsqword-readfsword.md)<br/>
57-
[__writefsbyte, \__writefsdword, \__writefsqword, \__writefsword](../intrinsics/writefsbyte-writefsdword-writefsqword-writefsword.md)<br/>
58-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)
57+
[__incfsbyte, \__incfsword, \__incfsdword](../intrinsics/incfsbyte-incfsword-incfsdword.md)\
58+
[__readfsbyte, \__readfsdword, \__readfsqword, \__readfsword](../intrinsics/readfsbyte-readfsdword-readfsqword-readfsword.md)\
59+
[__writefsbyte, \__writefsdword, \__writefsqword, \__writefsword](../intrinsics/writefsbyte-writefsdword-writefsqword-writefsword.md)\
60+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)

docs/intrinsics/addgsbyte-addgsword-addgsdword-addgsqword.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Add a value to a memory location specified by an offset relative to the beginnin
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
void __addgsbyte(
1818
unsigned long Offset,
1919
unsigned char Data
@@ -32,12 +32,12 @@ void __addgsqword(
3232
);
3333
```
3434

35-
#### Parameters
35+
### Parameters
3636

37-
*Offset*<br/>
37+
*Offset*\
3838
[in] The offset from the beginning of `GS`.
3939

40-
*Data*<br/>
40+
*Data*\
4141
[in] The value to add to the memory location.
4242

4343
## Requirements
@@ -49,6 +49,8 @@ void __addgsqword(
4949
|`__addgsdword`|x64|
5050
|`__addgsqword`|x64|
5151

52+
**Header file** \<intrin.h>
53+
5254
## Remarks
5355

5456
These routines are only available as an intrinsic.
@@ -57,7 +59,7 @@ These routines are only available as an intrinsic.
5759

5860
## See also
5961

60-
[__incgsbyte, \__incgsword, \__incgsdword, \__incgsqword](../intrinsics/incgsbyte-incgsword-incgsdword-incgsqword.md)<br/>
61-
[__readgsbyte, \__readgsdword, \__readgsqword, \__readgsword](../intrinsics/readgsbyte-readgsdword-readgsqword-readgsword.md)<br/>
62-
[__writegsbyte, \__writegsdword, \__writegsqword, \__writegsword](../intrinsics/writegsbyte-writegsdword-writegsqword-writegsword.md)<br/>
62+
[__incgsbyte, \__incgsword, \__incgsdword, \__incgsqword](../intrinsics/incgsbyte-incgsword-incgsdword-incgsqword.md)\
63+
[__readgsbyte, \__readgsdword, \__readgsqword, \__readgsword](../intrinsics/readgsbyte-readgsdword-readgsqword-readgsword.md)\
64+
[__writegsbyte, \__writegsdword, \__writegsqword, \__writegsword](../intrinsics/writegsbyte-writegsdword-writegsqword-writegsword.md)\
6365
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)

docs/intrinsics/addressofreturnaddress.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Provides the address of the memory location that holds the return address of the
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
void * _AddressOfReturnAddress();
1818
```
1919

2020
## Requirements
2121

2222
|Intrinsic|Architecture|
2323
|---------------|------------------|
24-
|`_AddressOfReturnAddress`|x86, x64|
24+
|`_AddressOfReturnAddress`|x86, x64, ARM, ARM64|
2525

2626
**Header file** \<intrin.h>
2727

@@ -33,7 +33,7 @@ This routine is only available as an intrinsic.
3333

3434
## Example
3535

36-
```
36+
```cpp
3737
// compiler_intrinsics_AddressOfReturnAddress.cpp
3838
// processor: x86, x64
3939
#include <stdio.h>
@@ -67,5 +67,5 @@ int main() {
6767

6868
## See also
6969

70-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)<br/>
71-
[Keywords](../cpp/keywords-cpp.md)
70+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)\
71+
[Keywords](../cpp/keywords-cpp.md)

docs/intrinsics/assume.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Passes a hint to the optimizer.
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
__assume(
1818
expression
1919
)
2020
```
2121

22-
#### Parameters
22+
### Parameters
2323

24-
*expression*<br/>
24+
*expression*\
2525
Any expression that is assumed to evaluate to true.
2626

2727
## Remarks
@@ -45,11 +45,11 @@ For compatibility with previous versions, **_assume** is a synonym for **__assum
4545

4646
|Intrinsic|Architecture|
4747
|---------------|------------------|
48-
|`__assume`|x86, ARM, x64|
48+
|`__assume`|x86, ARM, x64, ARM64|
4949

5050
## Example
5151

52-
```
52+
```cpp
5353
// compiler_intrinsics__assume.cpp
5454
#ifdef DEBUG
5555
# define ASSERT(e) ( ((e) || assert(__FILE__, __LINE__) )
@@ -87,13 +87,13 @@ As a result of the `__assume(0)` statement, the compiler does not generate code
8787
8888
Because the compiler generates code based on `__assume`, that code might not run correctly if the expression inside the `__assume` statement is false at run time. If you are not sure that the expression will always be true at run time, you can use the `assert` function to protect the code.
8989
90-
```
90+
```C
9191
#define ASSERT(e) ( ((e) || assert(__FILE__, __LINE__)), __assume(e) )
9292
```
9393

9494
Unfortunately, this use of `assert` prevents the compiler from performing the default-case optimization that was described earlier in this document. As an alternative, you can use a separate macro, as follows.
9595

96-
```
96+
```C
9797
#ifdef DEBUG
9898
# define NODEFAULT ASSERT(0)
9999
#else
@@ -108,5 +108,5 @@ Unfortunately, this use of `assert` prevents the compiler from performing the de
108108

109109
## See also
110110

111-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)<br/>
112-
[Keywords](../cpp/keywords-cpp.md)
111+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)\
112+
[Keywords](../cpp/keywords-cpp.md)

docs/intrinsics/bitscanforward-bitscanforward64.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Search the mask data from least significant bit (LSB) to the most significant bi
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
unsigned char _BitScanForward(
1818
unsigned long * Index,
1919
unsigned long Mask
@@ -24,12 +24,12 @@ unsigned char _BitScanForward64(
2424
);
2525
```
2626

27-
#### Parameters
27+
### Parameters
2828

29-
*Index*<br/>
29+
*Index*\
3030
[out] Loaded with the bit position of the first set bit (1) found.
3131

32-
*Mask*<br/>
32+
*Mask*\
3333
[in] The 32-bit or 64-bit value to search.
3434

3535
## Return Value
@@ -44,14 +44,14 @@ If a set bit is found, the bit position of the first set bit found is returned i
4444

4545
|Intrinsic|Architecture|
4646
|---------------|------------------|
47-
|`_BitScanForward`|x86, ARM, x64|
48-
|`_BitScanForward64`|ARM, x64|
47+
|`_BitScanForward`|x86, ARM, x64, ARM64|
48+
|`_BitScanForward64`|ARM64, x64|
4949

5050
**Header file** \<intrin.h>
5151

5252
## Example
5353

54-
```
54+
```cpp
5555
// BitScanForward.cpp
5656
// compile with: /EHsc
5757
#include <iostream>
@@ -82,13 +82,13 @@ int main()
8282

8383
## Input
8484

85-
```
85+
```Input
8686
12
8787
```
8888

8989
## Sample Output
9090

91-
```
91+
```Output
9292
Enter a positive integer as the mask:
9393
Mask: 12 Index: 2
9494
```
@@ -97,4 +97,4 @@ Mask: 12 Index: 2
9797

9898
## See also
9999

100-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)
100+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)

docs/intrinsics/bitscanreverse-bitscanreverse64.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Search the mask data from most significant bit (MSB) to least significant bit (L
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
unsigned char _BitScanReverse(
1818
unsigned long * Index,
1919
unsigned long Mask
@@ -24,12 +24,12 @@ unsigned char _BitScanReverse64(
2424
);
2525
```
2626

27-
#### Parameters
27+
### Parameters
2828

29-
*Index*<br/>
29+
*Index*\
3030
[out] Loaded with the bit position of the first set bit (1) found.
3131

32-
*Mask*<br/>
32+
*Mask*\
3333
[in] The 32-bit or 64-bit value to search.
3434

3535
## Return Value
@@ -40,12 +40,12 @@ Nonzero if `Index` was set, or 0 if no set bits were found.
4040

4141
|Intrinsic|Architecture|Header|
4242
|---------------|------------------|------------|
43-
|`_BitScanReverse`|x86, ARM, x64|\<intrin.h>|
44-
|`_BitScanReverse64`|ARM, x64||
43+
|`_BitScanReverse`|x86, ARM, x64, ARM64|\<intrin.h>|
44+
|`_BitScanReverse64`|ARM64, x64|\<intrin.h>|
4545

4646
## Example
4747

48-
```
48+
```cpp
4949
// BitScanReverse.cpp
5050
// compile with: /EHsc
5151
#include <iostream>
@@ -76,13 +76,13 @@ int main()
7676

7777
## Input
7878

79-
```
79+
```Input
8080
12
8181
```
8282

8383
## Sample Output
8484

85-
```
85+
```Output
8686
Enter a positive integer as the mask:
8787
Mask: 12 Index: 3
8888
```
@@ -91,4 +91,4 @@ Mask: 12 Index: 3
9191

9292
## See also
9393

94-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)
94+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)

docs/intrinsics/bittest-bittest64.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Generates the `bt` instruction, which examines the bit in position `b` of addres
1313

1414
## Syntax
1515

16-
```
16+
```C
1717
unsigned char _bittest(
1818
long const *a,
1919
long b
@@ -26,10 +26,10 @@ unsigned char _bittest64(
2626

2727
### Parameters
2828

29-
*a*<br/>
29+
*a*\
3030
[in] A pointer to the memory to examine.
3131

32-
*b*<br/>
32+
*b*\
3333
[in] The bit position to test.
3434

3535
### Return Value
@@ -40,8 +40,8 @@ The bit at the position specified.
4040

4141
|Intrinsic|Architecture|Header|
4242
|---------------|------------------|------------|
43-
|`_bittest`|x86, ARM, x64|\<intrin.h>|
44-
|`_bittest64`|ARM, x64|\<intrin.h>|
43+
|`_bittest`|x86, ARM, x64, ARM64|\<intrin.h>|
44+
|`_bittest64`|ARM64, x64|\<intrin.h>|
4545

4646
## Remarks
4747

@@ -91,4 +91,4 @@ Binary representation:
9191

9292
## See also
9393

94-
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)
94+
[Compiler Intrinsics](../intrinsics/compiler-intrinsics.md)

docs/intrinsics/bittestandcomplement-bittestandcomplement64.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ unsigned char _bittestandcomplement64(
2424
);
2525
```
2626

27-
#### Parameters
27+
### Parameters
2828

29-
*a*<br/>
29+
*a*\
3030
[in, out] A pointer to the memory to examine.
3131

32-
*b*<br/>
32+
*b*\
3333
[in] The bit position to test.
3434

3535
## Return Value
@@ -40,8 +40,8 @@ The bit at the position specified.
4040

4141
|Intrinsic|Architecture|
4242
|---------------|------------------|
43-
|`_bittestandcomplement`|x86, ARM, x64|
44-
|`_bittestandcomplement64`|x64|
43+
|`_bittestandcomplement`|x86, ARM, x64, ARM64|
44+
|`_bittestandcomplement64`|x64, ARM64|
4545

4646
**Header file** \<intrin.h>
4747

0 commit comments

Comments
 (0)