On 06/30/2010 05:06 AM, M. -Eqbal Maraqa wrote:
> f1.c:5:1: error: unrecognizable insn:
> (insn 12 11 13 3 f1.c:4 
>    (set (mem/c/i:SI (reg/f:SI 23 [ D.1964 ]) [0 <retval>+0 S4 A32])
>          (mem/c/i:SI (plus:SI (reg/f:SI 19 virtual-stack-vars)
>                             (const_int -4 [0xfffffffffffffffc])) 
>                                      [0 tmp+0 S4 A32])) -1 (nil))
I strongly suspect that your movsi expander is incorrect.

> This is the call_value implementation in .md:
>     
> (define_expand "call_value"
>   [(parallel [(set  (match_operand 0 "register_operand" "")
>                   (call (match_operand 1 "general_operand" "")
>                         (match_operand 2 "")))
>               (clobber (reg:SI RETURN_ADDR_REGNUM))])]
>   ""
>  {
>    rtx dest = XEXP(operands[1], 0);
>    
>    if(!call_operand(dest, Pmode))
>      dest = force_reg(Pmode, dest);
>    
>    emit_call_insn(gen_call_value_internal(operands[0], dest, operands[2]));
>    DONE;
>   })
> 
> (define_insn "call_value_internal"
>   [(parallel [(set  (match_operand 0 "register_operand" "")
>                   (call (match_operand 1 "general_operand" "")
>                         (match_operand 2 "")))
>               (clobber (reg:SI RETURN_ADDR_REGNUM))])]
> 
>   ""
>   "bal\t%1")

You've missed that the operand to call is always a mem.  Most
ports look through this mem immediately, e.g.

  (call (mem (match_operand:P 1 "register_operand" "r"))
        (match_operand 2 ""))

Have another look at how the other ports expand and implement call.


r~

Reply via email to