[PATCH] Error out on inline-asm constraint "=f"
Akira Hatanaka
ahatanak at gmail.com
Fri Jul 18 15:57:12 PDT 2014
OK, I'll commit this patch and file a bug later.
Thank you for your review.
On Fri, Jul 18, 2014 at 10:50 AM, Eric Christopher <echristo at gmail.com>
wrote:
> This is OK.
>
> A better error message might be nice ala gcc:
>
> dzur:~> gcc -c bar.c
> bar.c: In function ‘f_output_constraint’:
> bar.c:3:3: error: output constraint 0 must specify a single register
> __asm("foo1 %0": "=f" (result));
> ^
>
> But that can be done later if you'd like. If you don't do it now,
> would you mind filing a bug?
>
> Thanks!
>
> -eric
>
> On Thu, Jul 17, 2014 at 11:14 PM, Akira Hatanaka <ahatanak at gmail.com>
> wrote:
> > This patch changes X86TargetInfo::validateAsmConstraint to check whether
> > constraint "f" is used for output operands and error-out if it is. The
> > following link explains why "=f" is disallowed.
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140718/bf364366/attachment.html>
More information about the cfe-commits
mailing list