Skip to content

Commit

Permalink
Merge pull request #1334 from ehuss/inline-assembly-x86_64
Browse files Browse the repository at this point in the history
Fix example for non-x86 targets
  • Loading branch information
ehuss authored May 5, 2023
2 parents 1f8dc72 + 650dd01 commit ae66749
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/inline-assembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,7 @@ unsafe {
);
}
assert_eq!(x, 4 * 6);
# }
```

## Syntax
Expand Down

0 comments on commit ae66749

Please sign in to comment.