Re: immediate operands without dollar sign for inline asm

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

 



On 12/16/2013 11:20 PM, dw wrote:
> 
> On 12/16/2013 3:29 AM, Luchezar Belev wrote:
>> Hello,
>> Sometimes one needs to pass an immediate operand to asm statement that
>> should not be prefixed with dollar sign (e.g. for doing custom things
>> with assembly directives).
>>
>> After much search in the internet i managed to find the way to do it:
>> when the operand is used in the assembly string, it must have the 'a'
>> modifier. (e.g. ".equ name, %a0" instead of ".equ name, %0".
>>
>> My question is: why is this feature not mentioned anywhere in the GCC
>> documentation and is so extremely hard to find info about? Does this
>> mean that it is planned for removal or deprecation? Can one rely on
>> it's presence in future GCC versions?
>> (I think it is extremely useful for some specific tasks, please don't
>> remove it!)
>>
> I also found the gcc docs for asm to be very limited, so I have been 
> re-writing them.
> 
> For example, I have documented a number of the modifiers (see 
> www.LimeGreenSocks.com/gcc/Extended-Asm.html#i386Operandmodifiers). 
> Because of concerns expressed in some of gcc's bug reports re asm, I 
> have tried to limit the number of modifiers I doc to those I believe are 
> essential, and commonly useful.  I haven't doc'ed %a.  Perhaps %c will 
> do what you need?
> 
> I haven't had much (actually any) response from the gcc doc people about 
> this effort.

I responded.  I reviewed part of it, and there were significant
technical inaccuracies that had to be addressed before the changes
were considered for inclusion.

> But perhaps someday these updates can be rolled back into the docs.

Perhaps.  What is your copyright assignment status?

Andrew.





[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