diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 99b1e8a99571..b963208f8c2d 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -55,6 +55,11 @@
+LLVM supports inline assembler expressions (as opposed to +Module-Level Inline Assembly) through the use of a special value. This +value represents the inline assembler as a string (containing the instructions +to emit), a list of operand constraints (stored as a string), and a flag that +indicates whether or not the inline asm expression has side effects. An example +inline assembler expression is: +
+ ++ int(int) asm "bswap $0", "=r,r" ++ +
+Inline assembler expressions may only be used as the callee operand of +a call instruction. Thus, typically we have: +
+ ++ %X = call int asm "bswap $0", "=r,r"(int %Y) ++ +
+Inline asms with side effects not visible in the constraint list must be marked +as having side effects. This is done through the use of the +'sideeffect' keyword, like so: +
+ ++ call void asm sideeffect "eieio", ""() ++ +
TODO: The format of the asm and constraints string still need to be +documented here. Constraints on what can be done (e.g. duplication, moving, etc +need to be documented). +
+ +