On Wed, Aug 12, 2009 at 12:16 PM, Eli Friedman<eli.fried...@gmail.com> wrote: > On Wed, Aug 12, 2009 at 9:51 AM, Ryan Flynn<parseer...@gmail.com> wrote: >> patch to handle commas in clobberlists like gcc does. i.e. "=A,A" >> >> the form "=AA" already appears to work, but the commas were causing >> trouble in semantic validation ("," unrecognized) and in parsing >> canonicalized asm (which already uses "," to separate constraints) >> >> error found in FreeBSD driver, but examples found elsewhere for 32-bit >> targets handling 64-bit math, i.e. >> http://gcc.gnu.org/ml/gcc-bugs/2000-02/msg00104.html (search for >> "=A,A") >> >> passes all clang tests; i wanted a review because my asm-fu is weak. >> let me know if this is horrible. thanks! > > This patch simply isn't correct. Take something like the following on x86: > > int x,y; > void a() { > asm("add %0,%1" : "+r,m"(x) : "rm,r"(y)); > } > > With this patch, if I'm not mistaken, both operands will end up in > memory, which is illegal. > > If you haven't seen them, docs are at > http://gcc.gnu.org/onlinedocs/gcc/Multi_002dAlternative.html .
Oh, and one more thing I didn't mention: LLVM doesn't provide the necessary support for implementing this properly, so implementing it would be a lot of work. -Eli _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits