[llvm-commits] [dragonegg] r126373 - /dragonegg/trunk/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Thu Feb 24 01:14:44 PST 2011


Author: baldrick
Date: Thu Feb 24 03:14:44 2011
New Revision: 126373

URL: http://llvm.org/viewvc/llvm-project?rev=126373&view=rev
Log:
Bail out if an "asm goto" statement is encountered rather than quietly
miscompiling the code.

Modified:
    dragonegg/trunk/llvm-convert.cpp

Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=126373&r1=126372&r2=126373&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Thu Feb 24 03:14:44 2011
@@ -6699,6 +6699,12 @@
 //===----------------------------------------------------------------------===//
 
 void TreeToLLVM::RenderGIMPLE_ASM(gimple stmt) {
+  // TODO: Add support for labels.
+  if (gimple_asm_nlabels(stmt) > 0) {
+    sorry("'asm goto' not supported");
+    return;
+  }
+
   // Some of the GCC utilities we use still want lists and not gimple, so create
   // input, output and clobber lists for their benefit.
   unsigned NumOutputs = gimple_asm_noutputs (stmt);





More information about the llvm-commits mailing list