This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
no_new_pseudos == 1 and force_reg
- To: gcc at gcc dot gnu dot org
- Subject: no_new_pseudos == 1 and force_reg
- From: thomas joseph <thomascanny at yahoo dot co dot nz>
- Date: Mon, 4 Jun 2001 22:48:39 +1200 (NZST)
Hi All
I am thomas and I am attempting to finish a gcc port
for an embedded processor.
I encountered a strange behaviour in gcc, when I try
to compile newlib.
My target allows loads/stores from/to memory
through
a register only. So, I have defined "movhi" pattern
in md file like this.
(define_expand "movhi"
[(set (match_operand:HI 0 "nonimmediate_operand" "")
(match_operand:HI 1 "general_operand" ""))]
""
"
{
/* Don't generate memory->memory moves, go through a
register */
if (no_new_pseudos == 0
&& GET_CODE (operands[0]) == MEM
&& (GET_CODE (operands[1]) == MEM)
|| GET_CODE (operands[1]) == CONST_INT))
{
operands[1] = force_reg (HImode, operands[1]);
}
else
abort (); //to check ....
}")
But while building newlib it says
internal_compiler_error in emit_insn.c in gen_movhi.
So, where could be the possible mistake I must have
made.
(This error comes For int to memory moves.
(my observation))
Some body addressed this issue in sh port. But it's
not quite clear why I one will get an error ??
Can somebody tell me where I am supposed to look for
this problem.
Thanks and regards
-Thomas