diff options
| author | bors <bors@rust-lang.org> | 2016-07-19 05:12:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-19 05:12:51 -0700 |
| commit | 27e766d7bc84be992c8ddef710affc92ef4a0adf (patch) | |
| tree | f345cf9cdd68dfc339f34e09b7dd3229d1c7c825 /src/doc | |
| parent | 92400cf8dcf411ce7e70ab2960639977d46d5b01 (diff) | |
| parent | 88b37b6d9cf8cbe12550c0ac5399e9cf08674ca9 (diff) | |
| download | rust-27e766d7bc84be992c8ddef710affc92ef4a0adf.tar.gz rust-27e766d7bc84be992c8ddef710affc92ef4a0adf.zip | |
Auto merge of #34898 - sanxiyn:rollup, r=sanxiyn
Rollup of 5 pull requests - Successful merges: #34807, #34853, #34875, #34884, #34889 - Failed merges:
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/book/inline-assembly.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/doc/book/inline-assembly.md b/src/doc/book/inline-assembly.md index a8340d9d31e..62e196a7ccd 100644 --- a/src/doc/book/inline-assembly.md +++ b/src/doc/book/inline-assembly.md @@ -60,6 +60,8 @@ asm!("xor %eax, %eax" : "eax" ); # } } +# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +# fn main() {} ``` Whitespace also doesn't matter: @@ -70,6 +72,8 @@ Whitespace also doesn't matter: # fn main() { unsafe { asm!("xor %eax, %eax" ::: "eax"); # } } +# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +# fn main() {} ``` ## Operands @@ -129,6 +133,8 @@ stay valid. // Put the value 0x200 in eax asm!("mov $$0x200, %eax" : /* no outputs */ : /* no inputs */ : "eax"); # } } +# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +# fn main() {} ``` Input and output registers need not be listed since that information @@ -164,6 +170,8 @@ unsafe { } println!("eax is currently {}", result); # } +# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] +# fn main() {} ``` ## More Information |
