Re: problem passing constants to inline asm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stas Sergeev <stsp@xxxxxxxx> writes:

> I am trying to write something like this:
> 
>   asm volatile (".space %0\n" :: "i"(sizeof(var)));
> 
> but this doesn't work because "i" prepends the number
> with the $ sign.
> I've only found the following hack to cheat gcc:
> 
>   asm volatile (".space %0\n" :: "m"(*(long*)sizeof(var)));
> 
> but that's quite nasty and doesn't work with -O0.
> 
> So, what is the right way of passing the constants to those
> "Special Dot Symbols" of gas?

Try %c0.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux