Merge pull request #1334 from ehuss/inline-assembly-x86_64

Fix example for non-x86 targets
This commit is contained in:
Eric Huss 2023-05-04 18:51:00 -07:00 committed by GitHub
commit ae66749a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@ The compiler will emit an error if `asm!` is used on an unsupported target.
## Example
```rust
# #[cfg(target_arch = "x86_64")] {
use std::arch::asm;
// Multiply x by 6 using shifts and adds
@ -32,6 +33,7 @@ unsafe {
);
}
assert_eq!(x, 4 * 6);
# }
```
## Syntax