Extended Asm Constraint problem (probably 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 within i386 gcc inline assembler, i.e. immediate value without "$" prefix, so I can use it as a constant offset for some memory address or constant address with some explicit base and index registers.
  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?

Greetings,

Serge Dundich



[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