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]

Re: RFA: non-const libcalls

>>>>> "Alexandre" == Alexandre Oliva <> 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.


  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

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

Good documentation is very important.  Thanks for doing this!

Mark Mitchell         
CodeSourcery, LLC     

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