x86 PIC regressions
Geoffrey KEATING
geoffk@discus.anu.edu.au
Sat Sep 19 00:06:00 GMT 1998
> 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>
More information about the Gcc-patches
mailing list