Skip to content

Commit 077349a

Browse files
committed
only forbid correctness-critical analyses from inspecting the template string
1 parent e5d04c8 commit 077349a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/docs/LangRef.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5229,13 +5229,13 @@ flag that indicates whether or not the inline asm expression has side effects,
52295229
and a flag indicating whether the function containing the asm needs to align its
52305230
stack conservatively.
52315231

5232-
The compiler's understanding of the semantics of the expression comes only from
5233-
the list of operand constraints and the flags -- not the contents of the
5234-
template string. In particular, no optimizations or analyses will be performed
5235-
based on the contents of that string. This ensures correct behavior if the
5236-
assembly code emitted by this expression is altered later, e.g. via
5237-
self-modifying code, as long as the code keeps upholding the requirements of the
5238-
operand constraints and the flags.
5232+
The compiler may not assume that the actual code executed at runtime matches the
5233+
contents of the template string. Correctness-critical analyses must base their
5234+
results only on the list of operand constraints and the flags -- not the
5235+
contents of the template string. This ensures correct behavior if the assembly
5236+
code emitted by this expression is altered later, e.g. via self-modifying code,
5237+
as long as the code keeps upholding the requirements of the operand constraints
5238+
and the flags.
52395239

52405240
The template string supports argument substitution of the operands using "``$``"
52415241
followed by a number, to indicate substitution of the given register/memory

0 commit comments

Comments
 (0)