[llvm] r280071 - docs: mention that clobbering output regs in inline asm is illegal.

Peter Zotov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 03:48:31 PDT 2016


Author: whitequark
Date: Tue Aug 30 05:48:31 2016
New Revision: 280071

URL: http://llvm.org/viewvc/llvm-project?rev=280071&view=rev
Log:
docs: mention that clobbering output regs in inline asm is illegal.

I've found this out the hard way; LLVM will not normally catch this
error (unless -verify-machineinstrs is passed), and under certain
very specific circumstances (such as register scavenger running
under pressure) this would result in an opaque crash in codegen.

Modified:
    llvm/trunk/docs/LangRef.rst

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=280071&r1=280070&r2=280071&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Tue Aug 30 05:48:31 2016
@@ -3385,6 +3385,9 @@ constraints, e.g. "``~{eax}``". The one
 memory locations -- not only the memory pointed to by a declared indirect
 output.
 
+Note that clobbering named registers that are also present in output
+constraints is not legal.
+
 
 Constraint Codes
 """"""""""""""""




More information about the llvm-commits mailing list