On Tue, Apr 26, 2011 at 1:44 AM, Ian Lance Taylor <i...@google.com> wrote:
> Liu <pro...@gmail.com> writes:
>
>> I get a error:
>> /opt/cross-tools/bin/../lib/gcc/mips64el-unknown-linux-gnu/4.5.1/include/xx.h:1535:31:
>> error: invalid argument to built-in function
>
> That is an error from the MIPS backend.
>
> In this case it seems to mean that the mode for the type int64x4_t does
> not match the mode for the insn in the .md file.  I don't know where
> int64x4_t is defined, so I don't know what its mode is.  It looks like
> you want the mode to be V4DImode; is it?
>
> Ian
>

now I modify the pattern into:
(define_insn "hr_vpextrv4di"
  [(set (match_operand:V4DI 0 "register_operand" "=Z")
        (unspec:V4DI
          [(match_operand:V4DI 1 "register_operand" "Z")
           (match_operand:SI 2 "const_int_operand" "")]
          UNSPEC_HR_VPEXTR))]
  "TARGET_HR_VECTORS"
  "vpextrd\t%0,%1,%2"
  [(set_attr "type" "vadd")])

then I compile the testcase:
mips64el-unknown-linux-gnu-gcc -march=hr1 -S extrd-func.c -fdump-rtl-all

I get the expand-pass rtl only, in the rtl file, it doesn't match the
pattern at all!

How can I fix this bug?

Reply via email to