This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] allow certain kinds of inputs to top level asm()-s


>>> On 30.09.11 at 14:47, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Sep 30, 2011 at 12:43:54PM +0100, Jan Beulich wrote:
>> This is so that use of symbols referenced in these asm()-s can be
>> properly tracked by the compiler, just like is the case for all other
>> asm()-s. I'm particularly looking forward to use this in the Linux
>> kernel. It is certainly not very useful in PIC code, at least not with
>> some extra care.
> 
> Even in PIC code it can be useful to have toplevel asm like
> asm ("..." : : "i" (offsetof (struct S, field)), "i" (some_enum_value), "i" 
> (sizeof (struct S)));
> etc.

But wasn't it you who pointed out that this has limited use in PIC
mode when I first submitted this?

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]