Ping... Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
-----Original Message----- From: Weiming Zhao [mailto:[email protected]] Sent: Wednesday, July 25, 2012 11:57 AM To: 'Jordan Rose' Subject: FW: [cfe-commits] Bug 11709 Fix: va_list on ARM is not following AAPCS 7.1.4 Hi Jordan, I checked my patch on bugzilla. It is already for the master branch tip. Feel free to review it. Thanks, Weiming -----Original Message----- From: Weiming Zhao [mailto:[email protected]] Sent: Friday, July 20, 2012 9:57 AM To: 'Jordan Rose' Cc: '[email protected]' Subject: RE: [cfe-commits] Bug 11709 Fix: va_list on ARM is not following AAPCS 7.1.4 Hi Jordan, Sorry, my bad. I posted the wrong patch, which was for LLVM 3.1 My current change is based on the master branch, which is a little more complex to do than the original literal declaration of va_list. I'm attaching the patch for master now. I'll update the bugzilla as well. Unfortunately, I still need to deal with the copy-constructor assertion. Thanks, Weiming -----Original Message----- From: Jordan Rose [mailto:[email protected]] Sent: Thursday, July 19, 2012 6:12 PM To: Weiming Zhao Cc: [email protected] Subject: Re: [cfe-commits] Bug 11709 Fix: va_list on ARM is not following AAPCS 7.1.4 Hi, Weiming. This patch is stale; va_list is now defined by ASTContext (see ASTContext.cpp). I'm not sure if the copy-constructor assertion will still be a problem using the new implementation. Thanks for catching this problem, though. Are you willing to rewrite it using the current handling of va_list? Jordan On Jul 19, 2012, at 4:00 PM, Weiming Zhao wrote: > Hello, > > ARM AAPCS ABI Section 7.1.4 > (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aa > pcs.pdf) specifies that va_list should be defined as struct __va_list > { void *__ap; } And in C++, __va_list is in namespace std. > > However, LLVM defined it as "void *__ap", which generates different mangled name for C++ code. > > For example: > For the following c++ code: > > #include <stdarg.h> > int bar(int a, va_list args) > { > } > > It should generate the name "_Z3bariSt9__va_list" (GCC 4.4 does that correctly). > But now, it generates "_Z3bariPv". > > Therefore, there is linkage issues between LLVM and other toolchains that follow the ABI spec. > > I attached the fix and test case. (uploaded to http://llvm.org/bugs/show_bug.cgi?id=11709 as well). > It passes the test suite. For the unit test, no new fails. (the before/after test report is attached). > > One thing I'm very certain is the change in lib/AST/ExprClassification.cpp. Without that change, in debug build, the assertion will be triggered. > So I relax the condition to let __va_list to pass the check. Please let me know if there is a better solution. > > Please review the patch. > > Thanks, > Weiming > > > > <0001-change-definiation-of-va_list-to-meet-arm-abi.patch><test-suite- > report_after.log><unit_test_after.log><unit_test_before.log>__________ > _____________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
