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 do I get pc-relative constant loads?


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


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