This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
More troubles in ColdFire land
- From: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 21 Mar 2002 13:09:11 -0500
- Subject: More troubles in ColdFire land
I've stumbled across another problem in that GO_IF_LEGITIMATE_ADDRESS
doesn't discern between source and destination addresses, so it allows
(reg+reg) which works in most cases *except* in moves where the source
is immediate. In this case it is not allowed. As a result I get this error:
/tmp/foo3.c:312: Insn does not satisfy its constraints:
(insn 82 1783 83 (set (mem:QI (plus:SI (reg/f:SI 14 %a6)
(reg:SI 5 %d5)) 10)
(const_int 32 [0x20])) 45 {movqi_cfv4} (nil)
(nil))
/tmp/foo3.c:312: Internal compiler error in reload_cse_simplify_operands, at reload1.c:8364
I'm thinking of modifying the movqi pattern to be:
(define_expand "movqi"
[(set (match_operand:QI 0 "nonimmediate_operand" "")
(match_operand:QI 1 "general_src_operand" ""))]
""
"
{
if (TARGET_COLDFIRE && !coldfire_valid_move(QImode, operands))
FAIL;
}")
And then define coldfire_valid_move() to look at both operands and
return TRUE if they are valid for the mode.
Is this the best way to solve this, or is there a better method?
Thanx.
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)