On Fri, 2014-02-21 at 09:28 -0500, Rafael Espíndola wrote: > > That doesn't make sense, because '-S' means "no assembler". > > So -no-integrated-as should be *implicit* in that. > > I disagree. Clang can parse assembly and we should make more use of it > than we do now. Right now the only thing we do is diagnose errors > earlier, but we should really be doing things like checking provided > constraints against the instructions.
I'm very wary of that approach. Surely the use case for inline assembly, almost by *definition*, is that we're doing something that the compiler doesn't understand and/or doesn't get right. We don't want it looking inside and thinking it knows best, even in the case where it *is* going to see instructions that it actually knows about. Perhaps *especially* in that case. But I suppose the specific case you mention, of checking constraints, could have some merit. Even if the compiler takes a strictly "hands-off" approach and doesn't screw with the output in any way, it could still *see* that it's using instructions which clobber certain registers, and then give a warning if those clobbers are missing. But unless it's actually *using* the integrated assembler, if it can't parse what's in the inline asm, the failure mode should be that it just does nothing and doesn't manage to emit any such warnings. It certainly shouldn't bail out with an error, which is the subject of bug 18891. -- dwmw2
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
