This is the mail archive of the gcc-help@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: GCC Inline assembly - immediate integer operand emit without $


    asm (".pushsection .test\n"
         ".long 0, %P0, %P1\n"

         ".popsection"
         :: "i"(ENUM_VAL2), "i"(2));

but this is quite hackish, %P isn't meant for this.  On newer GCC
versions there is %p, which is better.

Thanks - it is what exactly I wanted.

I knew I forgot something :-) Please use "%c0" instead, which works on every GCC version, and is portable even.


Segher



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