This is the mail archive of the 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: Fix build failure for mipsisa64-elf

Adam Nemet wrote:
Kenneth's patch to clean up handling of pure and constant functions
( leads to a crash on
mipsisa64-elf because we call end_sequence without a matching start_sequence
in emit_library_call_value_1:

if (flags & ECF_LIBCALL_BLOCK) start_sequence (); ...
for (; count < nargs; count++) { ...
/* loop.c won't look at CALL_INSN_FUNCTION_USAGE of const/pure functions, so we have to pretend this isn't such a function. */ if (flags & ECF_LIBCALL_BLOCK) { rtx insns = get_insns (); end_sequence (); emit_insn (insns); } flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK);

This last line was removed which used to ensure that the code above it was
only run once and not for all arguments.

The patch below restores this without the const/pure bits.

Build and testing on mipsisa64-elf and x86_64-linux-gnu is still in progress
but if successful, is this OK to check in?  Maybe obvious?


	* calls.c (emit_library_call_value_1): Restore code clearing
	ECF_LIBCALL_BLOCK to ensure that we only call end_sequence

Index: calls.c
--- calls.c (revision 135252)
+++ calls.c (working copy)
@@ -3495,6 +3495,7 @@ emit_library_call_value_1 (int retval, r
end_sequence ();
emit_insn (insns);
+ flags &= ~ECF_LIBCALL_BLOCK;
/* If this was a CONST function, it is now PURE since it now
reads memory. */
I cannot approve this, but you are correct, and it should be approved.



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