This is the mail archive of the
mailing list for the GCC project.
Query with legitimate_constant_p
- From: "Daniel Towner" <dant at picochip dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Sun, 10 Feb 2002 19:46:07 -0000
- Subject: Query with legitimate_constant_p
I am writing a new port of GCC. I want to prevent symbol_refs from being
used as immediate operands, so I am specifically rejecting these in
legitimate_constant_p. However, this also means that the addresses of
symbol_refs can't be computed (e.g, loading the address into a register),
where previously a `mov??3' instruction was used to move the symbol_ref
address into a register. This no longer works, as the mov instruction can't
accept an immediate symbol_ref any more. How do I fix this? Do I need an
instruction pattern which just matches a symbol_ref and loads its value
into a register, or do I need to use a define_expand to explicitly create
such an instruction?
picoChip Designs Ltd.
108, Walcot Street, BATH, BA1 5BG, UK
+44 (0) 7786 702589