__asm...

Thiago Macieira thiago at kde.org
Thu Feb 16 16:19:41 CET 2006


Ralf Habacker wrote:
>Paulo Moura Guedes schrieb:
>> It seems gcc support a different inline assembly sintax:
>> asm("assembly code");
>>
>> If anyone who knows assembly would be so kind to port this to gcc
>> would be great. Documentation can be found here:
>> http://www-128.ibm.com/developerworks/library/l-ia.html
>> http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
>
>Can anyone tell me what the instruction
>
>    mov EAX, FS:[18h]
>
>means. Does it means
>
>    add 18hex to the value of 'fs' register and store it into eax

move 32 bits from the 0x18 bytes after FS:0 to the register EAX.

Normally, this would have been written in full form
  mov EAX, DWORD PTR FS:[18h]

In AT&T syntax, it would be:
  movl  %fs:0x18,%eax

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

1. On frumscafte, hwonne time_t wæs náht, se scieppend þone circolwyrde 
wundorcræftlíge cennede and seo eorðe wæs idel and hit wæs gód.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060216/43e34b18/attachment.pgp 


More information about the Kde-buildsystem mailing list