This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Howto reference a table in a structure in assembler



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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]