This is the mail archive of the
mailing list for the GCC project.
Re: x86 PIC regressions
> Date: Fri, 18 Sep 1998 21:31:41 -0700
> From: Richard Henderson <firstname.lastname@example.org>
> Yeah, but "i" doesn't even make sense when pic -- it isn't a constant.
int a = 0;
int b = 0;
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
I admit it's a pretty bizzare example, though.
Geoff Keating <Geoff.Keating@anu.edu.au>