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]
Other format: [Raw text]

Re: Unexpected output constraints


On 04/01/2010 11:08 PM, Daniel Jacobowitz wrote:

> (define_insn "tls_load_dot_plus_four"
>   [(set (match_operand:SI 0 "register_operand" "=l,r")
>         (mem:SI (unspec:SI [(match_operand:SI 1 "register_operand" "l,r")
>                             (const_int 4)
>                             (match_operand 2 "" "")]
>                            UNSPEC_PIC_BASE)))
>    (clobber (match_scratch:SI 3 "=&1,&1"))]

That doesn't work either, a matching constraint has to be an input.
Also, legitimize_tls_address is calling it with the same reg for both
operands, which is going to lead to tears if they're both outputs.  So,
maybe simply

 (define_insn "tls_load_dot_plus_four"
   [(set (match_operand:SI 0 "register_operand" "=l,r")
         (mem:SI (unspec:SI [(match_operand:SI 1 "register_operand" "0,0")
                             (const_int 4)
                             (match_operand 2 "" "")]
                            UNSPEC_PIC_BASE)))]

but on the other hand maybe it's best to find whoever wrote the pattern
and ask them what's going on.


Bernd


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