How do I get pc-relative constant loads?
Alan Lehotsky
apl@alum.mit.edu
Mon Mar 25 16:15:00 GMT 2002
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
More information about the Gcc
mailing list