//===---- AMDCallingConv.td - Calling Conventions for Radeon GPUs ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This describes the calling conventions for the AMD Radeon GPUs. // //===----------------------------------------------------------------------===// // Inversion of CCIfInReg class CCIfNotInReg : CCIf<"!ArgFlags.isInReg()", A> {} // Calling convention for SI def CC_SI : CallingConv<[ CCIfInReg>>, CCIfInReg>>, CCIfNotInReg>>, // This is the default for i64 values. // XXX: We should change this once clang understands the CC_AMDGPU. CCIfType<[i64], CCAssignToRegWithShadow< [ SGPR0, SGPR2, SGPR4, SGPR6, SGPR8, SGPR10, SGPR12, SGPR14 ], [ SGPR1, SGPR3, SGPR5, SGPR7, SGPR9, SGPR11, SGPR13, SGPR15 ] >> ]>; def CC_AMDGPU : CallingConv<[ CCIf<"State.getTarget().getSubtarget().device()"# "->getGeneration() == AMDGPUDeviceInfo::HD7XXX", CCDelegateTo> ]>;