Fix invalid calling convention used for libcalls on ARM.
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 2 Dec 2014 16:04:58 +0000 (16:04 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 2 Dec 2014 16:04:58 +0000 (16:04 +0000)
commitd90dd7977e2d25a4f190c833114d97d354ce0590
tree62459a8646ce57164c8f687edfeb4665580f5455
parent870e7909243e0e7c02d40ce363aaf6bd53c28d21
Fix invalid calling convention used for libcalls on ARM.
ARM ABI specifies that all the libcalls use soft FP ABI
(even hard FP binaries). These days clang emits _mulsc3 / _muldc3
calls with default (C) calling convention which would be translated
into AAPCS_VFP LLVM calling and thus the result of complex
multiplication will be bogus.

Introduce a way for a target to specify explicitly calling
convention for libcalls. Right now this is temporary correctness
fix. Ultimately, we'll end with intrinsic for complex
multiplication and all calling convention decisions for libcalls
will be put into backend.

llvm-svn: 223123
clang/lib/CodeGen/ABIInfo.h
clang/lib/CodeGen/CGExprComplex.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/complex-math.c