Skip to content

Commit e5d04c8

Browse files
committed
explicitly mention self-modifying code
1 parent 173fc51 commit e5d04c8

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

llvm/docs/LangRef.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5227,10 +5227,15 @@ represents the inline assembler as a template string (containing the
52275227
instructions to emit), a list of operand constraints (stored as a string), a
52285228
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
5230-
stack conservatively. The compiler's understanding of the semantics of the
5231-
expression comes only from the list of operand constraints and the flags -- not
5232-
the contents of the template string. In particular, no optimizations or analyses
5233-
will be performed based on the contents of that string.
5230+
stack conservatively.
5231+
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.
52345239

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

0 commit comments

Comments
 (0)