Skip to content

Commit 77805f6

Browse files
authored
Typo fixed in description of inline ASM cpuid function
1 parent 2a92848 commit 77805f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unsafe/asm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn main() {
265265
```
266266

267267
In the example above we use the `cpuid` instruction to read the CPU manufacturer ID.
268-
This instruction writes to `eax` with the maximum supported `cpuid` argument and `ebx`, `esx`, and `ecx` with the CPU manufacturer ID as ASCII bytes in that order.
268+
This instruction writes to `eax` with the maximum supported `cpuid` argument and `ebx`, `edx`, and `ecx` with the CPU manufacturer ID as ASCII bytes in that order.
269269

270270
Even though `eax` is never read we still need to tell the compiler that the register has been modified so that the compiler can save any values that were in these registers before the asm. This is done by declaring it as an output but with `_` instead of a variable name, which indicates that the output value is to be discarded.
271271

0 commit comments

Comments
 (0)