[cfe-commits] [PATCH] MS style inline assembly support
Chandler Carruth
chandlerc at google.com
Mon Jun 11 14:01:42 PDT 2012
Other comments:
Why is this not behind an extension warning? I don't think we want to
blindly accept this code until the parsing and sema logic has settled
significantly.
Also, I think the CodeGen part really isn't ready to be committed yet:
+
+void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) {
+ // Analyze the asm string to decompose it into its pieces. We know that
Sema
+ // has already done this, so it is guaranteed to be successful.
+
+ // Assemble the pieces into the final asm string.
+ std::string AsmString = S.getAsmString()->getString().str();
+
+ // Get all the output and input constraints together.
+
+ std::vector<llvm::Value*> Args;
+ std::vector<llvm::Type *> ArgTypes;
+ std::string Constraints;
+
+ // Keep track of inout constraints.
+
+ // Append the "input" part of inout constraints last.
+
+ // Clobbers
This isn't even code yet. I think this shouldn't be committed until you
actually have some working implementation, or it should be a simple stub
function that immediately errors saying that MS-style asm codegen isn't yet
supported.
Anyways, I'm excited by the work, and I'd really like to see the overall
design in more detail. One thing that would be good for this is perhaps a
RFC email with a sketch of the design, and then committing that as an
in-progress language extension in Clang's documentation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120611/f35dbe5f/attachment.html>
More information about the cfe-commits
mailing list