This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

insn constraints


I'm undertaking a port of GCC to a new architecture, which is now fairly
complete.  However, when testing with 'real-world' programs, I've come
across an error which seems strange to me, and doesn't really fit with my
mind's model of how constraints work.  

I'm getting the following error (see bottom for explanation of
self-defined constraint codes):

./eldby.c: In function `main':
./eldby.c:8: Insn does not satisfy its constraints:

(insn 727 690 692 (set (reg/v:DF 159 ARG27_REG)
        (reg:DF 132 ARG0_REG)) 4 {movdf} (nil)
    (nil))


when movdf is defined in my .md file as:

(define_insn "movdf"
  [(set (match_operand:DF 0 "nonimmediate_operand" "=gD")
        (match_operand:DF 1 "jvm_source_operand" "gD"))]
  ""
  "%D1%R0")

but /not/ when it's defined as:

(define_insn "movdf"
  [(set (match_operand:DF 0 "nonimmediate_operand" "=gD")
        (match_operand:DF 1 "jvm_source_operand" "g"))]
  ""
  "%D1%R0")

where D is defined as returning 'ALL_REGS' in the REG_CLASS_FROM_LETTER
macro.

I had thought that the first version would be /less/ constrained than the
second case, but that appears not to be tha case.

What am I missing?

Thanks,
Jamie. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]