On 08/23/2009 10:19 PM, Mohamed Shafi wrote:
I am getting the following error when i make a function call.
(call_insn 18 17 19 3 1.c:29 (set (parallel:DI [
(expr_list:REG_UNUSED (reg:SI 7 d7)
(const_int 0 [0x0]))
(expr_list:REG_UNUSED (reg:SI 6 d6)
(const_int 4 [0x4]))
])
(call:SI (mem:SI (symbol_ref:SI ("dd1") [flags 0x41]
<function_decl 0xb7bfa980 dd1>) [0 S4 A8])
(const_int 8 [0x8]))) -1 (nil)
(expr_list:REG_DEP_TRUE (use (reg:SI 7 d7))
(expr_list:REG_DEP_TRUE (use (reg:SI 6 d6))
(nil))))
How do i write a pattern for this?
That isn't an error. Presumably the actual error is that this
pattern isn't recognized. Your call_value pattern is probably
wrong. It should look sort of like
(define_expand "call_value_osf"
[(parallel [(set (match_operand 0 "" "")
(call (mem:DI (match_operand 1 "" ""))
(match_operand 2 "" "")))
(use (reg:DI 29))
(clobber (reg:DI 26))])]
from alpha. Notice that operand 0 has no predicate and no
constraint.
Another question is in LITTLE ENDIAN mode for the return value will
the compiler know that values are actually stored the other way.. in
big endian format? And generate the code accordingly for the rest of
the program?
Yes.
r~