Re: Howto reference a table in a structure in assembler

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

 




clobbering %eax.  I would like to do instead (if I have to do it in
assembler):

movzbl 1(%eax),%ecx
jmp    *tab_a7(%ecx,%edx,4)

Well, almost there.  My routine looks like
__asm__ (
"movzbl 1(%%eax),%%ecx\n\t"
"jmp *%0(%%ecx,%%edx,4)"
: : "i" (offsetof(x, tab_a7))
);

But this generates `jmp *$1540(%ecx,%edx,4)'
instead of `jmp *1540(%ecx,%edx,4)'
which asm doesn't like.

Is there some constraint available so I don't get the $

Greg Smith


[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