This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH][AARCH64] Fix the name mangling of va_list


On 21/11/12 14:31, Yufeng Zhang wrote:
Hi,

This patch updates the AArch64 port to mangle __va_list as it is in
namespace std in C++.  This is specified in the AArch64 AAPCS64 ABI doc.

OK for the trunk?

Thanks,
Yufeng

gcc/ChangeLog

2012-11-21 Yufeng Zhang <yufeng.zhang@arm.com>

          * config/aarch64/aarch64.c (aarch64_mangle_type): New function.
          (TARGET_MANGLE_TYPE): Define.


The change to the AArch64 port itself is OK.


gcc/testsuite/ChangeLog

2012-11-21 Yufeng Zhang <yufeng.zhang@arm.com>

* g++.dg/abi/arm_va_list.C: Also test on aarch64*-*-*.


// AAPCS \S 7.1.4 requires that va_list be a typedef for "struct // __va_list". The mangling is as if it were "std::__va_list". +// So is required for the AArch64 target.


The functional change in this test makes sense however the comment change is slightly confusing. The original comment refers to the procedure call standard for AArch32: IHI0042D_aapcs.pdf.


The procedure call standard for AArch64 is defined in IHI0055A_aapcs.pdf. This document also discusses va_list in chapter 7.1.4. Perhaps a different form of words distinguishes between the two different PCS documents would be better? Perhaps something along these lines:

// AAPCS \S 7.1.4 requires that va_list be a typedef for "struct
// __va_list".  The mangling is as if it were "std::__va_list".
// AArch64 PCS IHI0055A_aapcs64.pdf \S 7.1.4 requires that va_list
// be a typedef for "struct __va_list".  The mangling is as if it
// were "std::__va_list".

In any case I don;t believe I can OK this change to the generic part of the test suite. Suggest you CC Mike Stump or Janis Johnson.


Cheers


/Marcus



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