about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-05 04:35:13 +0000
committerbors <bors@rust-lang.org>2021-11-05 04:35:13 +0000
commitb99bd8f8be49ba9676d3274fdbd06b2d476adfcd (patch)
treed5d6436ab391a2b0da3d1772ee75b1f958de8fce /src/doc
parenta6162f6c0ff39a6cc8dcb11a456e54f592653cc9 (diff)
parent3821ab231b2bdf6c6d6871fec45121c2f8715d1e (diff)
downloadrust-b99bd8f8be49ba9676d3274fdbd06b2d476adfcd.tar.gz
rust-b99bd8f8be49ba9676d3274fdbd06b2d476adfcd.zip
Auto merge of #90598 - JohnTitor:rollup-kz1qioz, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #90507 (Suggest `extern crate alloc` when using undeclared module `alloc`)
 - #90530 (Simplify js tester a bit)
 - #90533 (Add note about x86 instruction prefixes in asm! to unstable book)
 - #90537 (Update aarch64 `target_feature` list for LLVM 12.)
 - #90544 (Demote metadata load warning to "info".)
 - #90554 (Clean up some `-Z unstable-options` in tests.)
 - #90556 (Add more text and examples to `carrying_{add|mul}`)
 - #90563 (rustbot allow labels)
 - #90571 (Fix missing bottom border for headings in sidebar)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/unstable-book/src/library-features/asm.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/library-features/asm.md b/src/doc/unstable-book/src/library-features/asm.md
index 6bf21e8f58b..84fc6dcc339 100644
--- a/src/doc/unstable-book/src/library-features/asm.md
+++ b/src/doc/unstable-book/src/library-features/asm.md
@@ -885,5 +885,7 @@ The compiler performs some additional checks on options:
     - You are responsible for switching any target-specific state (e.g. thread-local storage, stack bounds).
     - The set of memory locations that you may access is the intersection of those allowed by the `asm!` blocks you entered and exited.
 - You cannot assume that an `asm!` block will appear exactly once in the output binary. The compiler is allowed to instantiate multiple copies of the `asm!` block, for example when the function containing it is inlined in multiple places.
+- On x86, inline assembly must not end with an instruction prefix (such as `LOCK`) that would apply to instructions generated by the compiler.
+  - The compiler is currently unable to detect this due to the way inline assembly is compiled, but may catch and reject this in the future.
 
 > **Note**: As a general rule, the flags covered by `preserves_flags` are those which are *not* preserved when performing a function call.