Unable to match an RTL pattern in new backend

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

 



Hi friends

i'm in the process of writing a backend for a RISC target. I'm trying to keep
helper functions (in <target>.c) at minimal, since my future aim is to automate
(at least partially) the generation of the machine description.

While some C programs compile and simulate OK, it seems that i cannot match the
following RTL pattern. I should note here that it is generated as a result of
using a function argument for computing an address expression. That is
something like:

t_array[arg0] = t_1;

where t_array is a global array, arg0 is the function argument and t_1 is a
local variable.

#(insn 60 58 62 (set (mem/s/j:SI (plus:SI (reg:SI 4 $a0 [60])
#                (symbol_ref:SI ("queen") <var_decl 0x101a3690 queen>)) [0 queen
S4 A32])
#        (reg/v:SI 22 $s6 [orig:48 i ] [48])) 4 {*movsi_internal}
(insn_list:REG_DEP_TRUE 58 (nil))
#    (expr_list:REG_DEAD (reg:SI 4 $a0 [60])
#        (nil)))

since it cannot identified the address expression for this operation (store).
What does get emitted is:
	sw 	$s6, 	;# 60	*movsi_internal/2

The movsi_internal is as follows:

(define_insn "*movsi_internal"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,m,r,r,r,m,r,r")
        (match_operand:SI 1 "general_operand" "m,r,r,z,e,S,S,i"))]
  ""
  "@
    lw \\t%0, %1
    sw \\t%1, %0             <--- matched pattern
    move \\t%0, %1
    move \\t%0, %1
    move \\t%0, %1
    move \\t%1, %0
    move \\t%0, %1
    li \\t%0, %1"
  [(set_attr "type"
"tload,tstore,tarith1,tarith1,tarith1,tstore,tarith1,tarith2")])

Any help is appreciated

Kind regards


[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