[PATCH] MC: provide the ability to disable assembly parsing

Daniel Sanders Daniel.Sanders at imgtec.com
Thu Feb 20 05:52:45 PST 2014

The GCC mailing list has a more complete explanation at http://gcc.gnu.org/ml/gcc/2014-02/msg00342.html but it doesn't mention that __NR_PAGEFLAGS from the first block of code is an enum value in the kernel source. From what I've seen so far, Linux is essentially using inline assembly and sed as a way to feed enum values into conditional compilation directives.

> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Joerg Sonnenberger
> Sent: 20 February 2014 13:24
> To: cfe-commits at cs.uiuc.edu; llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] MC: provide the ability to disable assembly parsing
> On Thu, Feb 20, 2014 at 12:19:57AM -0800, Saleem Abdulrasool wrote:
> > This provides an interface for the frontend to disable assembly
> > parsing.  This is needed in the case where inline assembly is being
> > processed to an assembly output (.s).  In this case, it is preferable
> > to not parse the assembly for correctness.  The Linux kernel, for
> > example, takes advantage of this to use the compiler as a preprocessor to
> generate a specially crafted "assembly"
> > file to be post-processed.
> Without a further clarification for why exactly the Linux kernel has to create
> invalid assembler, I see no good reason for adding such complexity.
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

More information about the cfe-commits mailing list