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: [email protected] [mailto:llvm-commits- > [email protected]] On Behalf Of Joerg Sonnenberger > Sent: 20 February 2014 13:24 > To: [email protected]; [email protected] > 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 > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
