[PATCH] D34475: [RFC] [AArch64] Add support for __builtin_ms_va_list on aarch64

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 21 13:27:22 PDT 2017


mstorsjo created this revision.
Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson.

This behaves mostly the same as __builtin_ms_va_list on x86_64; a va_list on windows on aarch64 is a single pointer.

In order to signal the kind of va_list to llvm for handling of va_start, a separate calling convention is used, signaled via __attribute__((ms_abi)) just as on x86_64.

This allows wine on aarch64 to properly handle variadic functions, successfully running arm64 exes (from the windows 10 sdk) with a few different variations of fprintf and vsnprintf.

This depends on https://reviews.llvm.org/D34474 for llvm.


https://reviews.llvm.org/D34475

Files:
  include/clang/Basic/BuiltinsAArch64.def
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/Specifiers.h
  lib/AST/ItaniumMangle.cpp
  lib/AST/MicrosoftMangle.cpp
  lib/AST/Type.cpp
  lib/AST/TypePrinter.cpp
  lib/Basic/Targets.cpp
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/CGDebugInfo.cpp
  lib/CodeGen/TargetInfo.cpp
  lib/Sema/SemaChecking.cpp
  lib/Sema/SemaDeclAttr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34475.103451.patch
Type: text/x-patch
Size: 11947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170621/6ff88372/attachment-0001.bin>


More information about the cfe-commits mailing list