This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: At the C++ ABI switch, make -mregparm=1 the default on x86?
- To: egcs at tantalophile dot demon dot co dot uk
- Subject: Re: At the C++ ABI switch, make -mregparm=1 the default on x86?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 9 Mar 2000 09:05:58 +0100
- CC: egcs at egcs dot cygnus dot com
- References: <20000308235133.B9657@pcep-jamie.cern.ch>
> 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