2012-02-18 20:03:15 +08:00
|
|
|
//=== ARMCallingConv.h - ARM Custom Calling Convention Routines -*- C++ -*-===//
|
2010-09-11 06:42:06 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-09-11 06:42:06 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2019-01-29 05:28:43 +08:00
|
|
|
// This file declares the entry points for ARM calling convention analysis.
|
2010-09-11 06:42:06 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_ARM_ARMCALLINGCONV_H
|
|
|
|
#define LLVM_LIB_TARGET_ARM_ARMCALLINGCONV_H
|
2010-09-11 06:42:06 +08:00
|
|
|
|
2012-03-17 15:33:42 +08:00
|
|
|
#include "llvm/CodeGen/CallingConvLower.h"
|
2010-09-11 06:42:06 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2019-01-29 05:28:43 +08:00
|
|
|
bool CC_ARM_AAPCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool CC_ARM_AAPCS_VFP(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool CC_ARM_APCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool CC_ARM_APCS_GHC(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool FastCC_ARM_APCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
Add Windows Control Flow Guard checks (/guard:cf).
Summary:
A new function pass (Transforms/CFGuard/CFGuard.cpp) inserts CFGuard checks on
indirect function calls, using either the check mechanism (X86, ARM, AArch64) or
or the dispatch mechanism (X86-64). The check mechanism requires a new calling
convention for the supported targets. The dispatch mechanism adds the target as
an operand bundle, which is processed by SelectionDAG. Another pass
(CodeGen/CFGuardLongjmp.cpp) identifies and emits valid longjmp targets, as
required by /guard:cf. This feature is enabled using the `cfguard` CC1 option.
Reviewers: thakis, rnk, theraven, pcc
Subscribers: ychen, hans, metalcanine, dmajor, tomrittervg, alex, mehdi_amini, mgorny, javed.absar, kristof.beyls, hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D65761
2019-10-28 21:22:19 +08:00
|
|
|
bool CC_ARM_Win32_CFGuard_Check(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo,
|
|
|
|
ISD::ArgFlagsTy ArgFlags, CCState &State);
|
2019-01-29 05:28:43 +08:00
|
|
|
bool RetCC_ARM_AAPCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool RetCC_ARM_AAPCS_VFP(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool RetCC_ARM_APCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
bool RetFastCC_ARM_APCS(unsigned ValNo, MVT ValVT, MVT LocVT,
|
|
|
|
CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags,
|
|
|
|
CCState &State);
|
|
|
|
|
|
|
|
} // namespace llvm
|
2010-09-11 06:42:06 +08:00
|
|
|
|
2010-09-11 06:46:03 +08:00
|
|
|
#endif
|