[PATCH] D94364: [clang] Allow specifying the aapcs and aapcs-vfp for windows on arm

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 9 13:56:30 PST 2021


mstorsjo created this revision.
mstorsjo added reviewers: rnk, compnerd, smeenai.
Herald added a subscriber: kristof.beyls.
mstorsjo requested review of this revision.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94364

Files:
  clang/lib/Basic/Targets/ARM.cpp
  clang/test/Sema/callingconv-win-arm.c


Index: clang/test/Sema/callingconv-win-arm.c
===================================================================
--- /dev/null
+++ clang/test/Sema/callingconv-win-arm.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -fsyntax-only -triple armv7-windows -verify
+
+// expected-no-diagnostics
+
+void __attribute__((fastcall)) foo(float *a);
+
+void __attribute__((stdcall)) bar(float *a);
+
+void __attribute__((cdecl)) ctest0();
+
+int __attribute__((pcs("aapcs"))) pcs5(void);
+int __attribute__((pcs("aapcs-vfp"))) pcs6(void);
Index: clang/lib/Basic/Targets/ARM.cpp
===================================================================
--- clang/lib/Basic/Targets/ARM.cpp
+++ clang/lib/Basic/Targets/ARM.cpp
@@ -1194,6 +1194,8 @@
   case CC_X86FastCall:
   case CC_X86VectorCall:
     return CCCR_Ignore;
+  case CC_AAPCS:
+  case CC_AAPCS_VFP:
   case CC_C:
   case CC_OpenCLKernel:
   case CC_PreserveMost:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94364.315636.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210109/73179d7c/attachment.bin>


More information about the cfe-commits mailing list