This is the mail archive of the gcc@gcc.gnu.org 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: At the C++ ABI switch, make -mregparm=1 the default on x86?


> However, there is movement afoot to change the C++ ABI.  In that
> case, maybe that would be a good time to declare that C++ calls use
> the -mregparm=1 calling convention?

No. One purpose of an ABI is to provide a reliable interface,
essentially over the lifetime of the architecture. It's not something
that should be changed lightly.

In particular, the Unix ABI is defined as consisting of the gABI
(generic ABI; file format and so on), and the psABI (processor
specific ABI, calling conventions). The psABI is defined for an entire
architecture, and typically used on all Unix variants operating on
this architecture. The C++ ABI is typically defined in terms of the
gABI, the psABI, and C++ specific extensions. This is also the case
for the new C++ ABI, which is a multi-vendor agreement on calling
conventions. If g++ would use other calling conventions, that would
defeat the purpose of the ABI.

Martin


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