This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How do I get pc-relative constant loads?
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- To: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 25 Mar 2002 18:34:01 -0500
- Subject: Re: How do I get pc-relative constant loads?
- References: <200203252306.g2PN6M821996@hyper.wm.sps.mot.com>
I believe that a lot of your questions could be answered by studying the ARM
target. It uses PC-relative addressing for constants.
At 6:06 PM -0500 3/25/02, Peter Barada wrote:
>I'm trying to fix up some of my COldFire v4e code generation, and the
>following code:
>
>......
>So my questions are:
>
>1) How can I force the double constants into the .text secgment so I
> can access them with PC-relative addressing?
>
>2) What's the proper syntax for pc-relative addressing(in the 68k)? is it:
> fmove.d (.LC0:w,%pc),%fp0
> to access .LC0 in the .text segment via pc-relative addressing?
>
>3) How can I tell the compiler to produce an operand of that type
> instead of using a symbol-ref which gets reloaded into an address
> register ?
>
>4) Better yet, how do I set up a constraint that allows pc-relative
> addressing so the address *doesn't* get reloaded but combined into
> the instruction? Are there examples in gcc-3.0.4?
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation