diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index e64b9343b7622..f5873fcd150e6 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -5229,6 +5229,14 @@ flag that indicates whether or not the inline asm expression has side effects, and a flag indicating whether the function containing the asm needs to align its stack conservatively. +The compiler may not assume that the actual code executed at runtime matches the +contents of the template string. Correctness-critical analyses must base their +results only on the list of operand constraints and the flags -- not the +contents of the template string. This ensures correct behavior if the assembly +code emitted by this expression is altered later, e.g. via self-modifying code, +as long as the code keeps upholding the requirements of the operand constraints +and the flags. + The template string supports argument substitution of the operands using "``$``" followed by a number, to indicate substitution of the given register/memory location, as specified by the constraint string. "``${NUM:MODIFIER}``" may also