This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On Mon, Aug 30, 1999 at 03:15:52AM -0400, Roland McGrath wrote: > extern struct foo seg __asm__("%gs:0"); > static inline struct foo * > the_foo(void) { return &seg; } > > int foobar(int x) > { > struct foo *me = the_foo(); > return x + me->y; > } > > This compiles to: > > foobar: > pushl %ebp > movl %esp,%ebp > movl %gs:0+4,%eax This is pretty cool, but it won't work with -fpic. There we'll try something like movl %gs:0@GOT(%ebx),%eax movl 4(%eax), %eax r~
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |