Extended Asm Constraint problem (may be missing feature)

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

 



Hi!

  I need the possibility to define the constant memory address/offset in i386
gcc inline assembler, i.e. immediate value without $ prefix, so I can use it as
a constant offset for some memory address.
  E.g. I want to access different fields of the same structure through a single
base register containing pointer to this structure or access different areas of
static data structure by using both base and index registers to construct
complete address.

Something like this:
    "movl %0(%%ebx), %%eax"    "\n\t"
    "movl %1(%%ebx), %%edx"    "\n\t"
    "movl %2(%%ebx,%%esi,4), %%ecx"    "\n\t"
where %0, %1, %2 are some constant paramenters (may be numeric constant or
external symbol or constant expression with external symbols) to assembler
statement.

Is there any way to do that?


Greeting,

Serge Dundich

PS: Sorry for duplicated message. I found that at least Mozilla don't do word
wrap within messages of this site which makes my previous message ugly and it
better be removed.


[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