Re: insn does not satisfy its constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 02, 2007 at 02:50:50PM +0200, Boris Boesler wrote:

>  The architecture has data and address registers (ala m68k) and for  
> the C code
> int c;
> void f(void){c=4711;}
> 
>  I get the code:
>         MV_WI32 R0, #_c         /* movsi Ax */
>         MV_WI32 R1, #4711       /* movsi Ax */
>         MV_WW   A1, R0  	/* movsi r */
>         store_D 0(A1), R1       /* movsi */
[snip]
>   MV_%M0%M1\t%0, %1 \t/* mov<mode> r */
>   MV_%M0%M1\t%0, %1 \t/* mov<mode> Ax */
>   MV_%M0%M1\t%0, %1 \t/* mov<mode> Rx */
>   store_%M0\t%0, %1 \t/* mov<mode> */
>   load_%M0\t%0, %1 \t/* mov<mode> */"
>   [(set_attr "length" "4,4,4,4,4")]
> )

   You can use -dp with -S instead of adding such comments.

>  The register sets Ax and Rx do not share any registers! Hm, I can  
> only think of placing the symbol in R0 with the third alternative and  
> then move again with the first alternative?!

   What does the .lreg dump file (-fdump-rtl-lreg) say about register costs?

> add_var.c: In function 'add_var':
> add_var.c:20: error: insn does not satisfy its constraints:
> (insn 8 24 9 (set (reg:SI 1 R1 [orig:103 a.0 ] [103])
>         (mem/c/i:SI (reg:SI 2 R2) [0 a+0 S4 A32])) 79 {movsi} (nil)
>     (nil))
> add_var.c:20: internal compiler error: in final_scan_insn, at final.c: 
> 2382
> 
>  The error happens, because GO_IF_LEGITIMATE_ADDRESS (strict  
> version) detects, that a data register is used like an address  
> register - that's illegal! (BASE_REG_CLASS is defined to Ax_REGS)
> 
>  So, where can I start my search to resolve this?

   GO_IF_LEGITIMATE_ADDRESS() must reject addresses which use hard registers
of the wrong class. Even when !REG_OK_STRICT.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux