This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: non-const libcalls
- To: aoliva at redhat dot com
- Subject: Re: RFA: non-const libcalls
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Tue, 08 May 2001 06:06:18 -0700
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, bernds at cygnus dot co dot uk, rth at cygnus dot com
- Organization: CodeSourcery, LLC
- References: <20010508011338O.mitchell@codesourcery.com><oroft441le.fsf@guarana.lsd.ic.unicamp.br>
>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
>> The TeXinfo documentation says that CALL_INSN_FUNCTION_USAGE
>> should only have CLOBBERs for hard registers, but we go ahead
>> and put MEMs there too. What's up with all that?
Alexandre> It seems that I forgot to update the docs, though. Ok
Alexandre> to install? Branch and mainline?
Yes, with a couple of minor changes:
+for arguments or return values passed by transparent reference) used or
"transparent reference" is not a common term of art, or defined
elsewhere in the manual. It's GCC-babble. :-)
It's also weird to say a return value is passed.
How about:
expressions that denote hard registers and @code{MEM}s. The
@code{MEM}s will typically be stack slots used for arguments
that are passed on the stack. If the function returns its
value in memory (as with calling conventions where structures
are returned in memory), the @code{MEM} for the return value
will be present as well.
And that suggests that (although you didn't explicitly answer), that
there *should* be a CLOBBER for the return value -- even though
expand_libcall_value_1 isn't adding one.
Finally,
A register specified in a
+@code{clobber} in this list is modified @emph{after} the execution of
+the @code{call_insn}, while a register in a @code{clobber} in the body
+of the @code{call_insn} is clobbered before the insn completes
+execution.
this bit didn't make sense to me before, and it still doesn't now.
What does it mean about "during" vs. "after"? How can something be
clobbered by the instruction after it finishes execution?
I think there's an important idea in here, but it's not coming out
with these words. Can you expand on that a little and/or provide an
example that shows what assumptions you can make it the two different
cases?
Good documentation is very important. Thanks for doing this!
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com