This is the mail archive of the gcc-patches@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]

Re: x86 PIC regressions


> Date: Fri, 18 Sep 1998 21:31:41 -0700
> From: Richard Henderson <rth@cygnus.com>

> Yeah, but "i" doesn't even make sense when pic -- it isn't a constant.

int a = 0;
int b = 0;

void foo(void)
{
  asm (".long %1-%0" : : "i"(&a), "i"(&b));
}

Of course, in a real program you would be using '%1-%0' as the
argument to some instruction, or something.  Or perhaps the rest of
the program is pic, but the asm is going to be non-pic for performance
reasons.

I admit it's a pretty bizzare example, though.

-- 
Geoff Keating <Geoff.Keating@anu.edu.au>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]