This is the mail archive of the gcc@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: How to take the address of a label_ref?


In message <20011121105431.A17291@redhat.com>, Richard Henderson writes:
>On Wed, Nov 21, 2001 at 08:37:50AM +0100, Adrian von Bidder wrote:
>> How do I, in the machine description, get the address of a label_ref
>> near the pc into a register?
>
>Just label_ref.  For arm, or maybe just thumb, this isn't a valid
>constant, and it gets spilled to the constant pool.
>
>I have no idea what you're trying to do, though.

I think what he's actually trying to do is generate "add rN, pc, #(.Lb - . - 
8)".
Kind of like the code in arm_finalize_pic() does to address the GOT.

p.



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