This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] calls.c, optabs.c: Remove multiple references to the libcall return reg.
On Tue, Sep 17, 2002 at 08:54:19AM -0400, Kazu Hirata wrote:
> + result = gen_reg_rtx (TYPE_MODE (integer_type_node));
> #ifdef TARGET_MEM_FUNCTIONS
> ! emit_library_call_value (memcmp_libfunc, result, LCT_PURE_MAKE_BLOCK,
> ! TYPE_MODE (integer_type_node), 3,
> ! XEXP (x, 0), Pmode, XEXP (y, 0), Pmode,
> ! convert_to_mode (TYPE_MODE (sizetype), size,
> ! TREE_UNSIGNED (sizetype)),
> ! TYPE_MODE (sizetype));
This should be
result = emit_library_call_value (memcmp_libfunc, NULL_RTX, ...);
I.e. the return value of emit_library_call_value should always
be honored. And if we don't have a specific place it should go
already, you just use NULL_RTX and let the call generate the
target register.
The patch is ok with that change.
r~