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: Bogus position independent code(PIC) emitted for ColdFire v4e


On Fri, Dec 06, 2002 at 02:38:33PM -0500, Peter Barada wrote:
> Are there any gotchas that I should be aware of(i.e. using UNSPEC will
> definitely *break* something in the 68k port)?

Not that I can think of.  If you wrap the UNSPEC in a CONST, then it
should be considered to be a 32-bit constant, and so will be accepted
anywhere a 32-bit constant is.

Which, for the '020 instruction set is ideal.  Carefully constructed
predicates should be used to allow just the right combinations for 
the coldfire.  E.g.

	(const (unspec [(symbol_ref "foo")] UNSPEC_GOT))

should expand to foo@GOT in the assembly.  But during compilation
we look at -fpic vs -fPIC to determine if this is a 16-bit or a
32-bit quantity, and thus whether it's allowed in the immediate field
of an address.


r~


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