Issue B1: Vptr (was Let's move on)

Christophe de Dinechin ddd at cup.hp.com
Thu Mar 2 18:21:59 UTC 2000


Jason Merrill wrote:
> 
> Christophe de Dinechin <ddd at cup.hp.com> writes:
> 
> > Mark Mitchell wrote:
> > >
> > > >>>>> "Jim" == Jim Dehnert <dehnert at baalbek.engr.sgi.com> writes:
> > >
> > >     Jim> OK.  One thing came up in Christophe's previous mail, though.
> > >     Jim> Has anyone else been assuming that the vptr as well as "this"
> > >     Jim> would be passed to virtual functions, for whatever reason?
> > >
> > > Not I.
> >
> > I did not either, but thinking about it, it might be useful for
> > virtual base adjustments.
> 
> I am strongly opposed to any caller-side overhead.  Furthermore, this
> would make the calling convention for non-static member functions
> different from that for other functions, which seems like a lose.

The only caller-side overhead I can think of is that you add a constraint on the
register allocation for the temporary that will hold the vptr. Something like:
before the long branch, r8 is live and contains rptr. I take r8 because it is to
be garbled by the return value anyway, so it is "free" for any other use.

Do you believe the cost is significant? Could you explain why?


Regards,
Christophe




More information about the cxx-abi-dev mailing list