diff options
Diffstat (limited to 'lib/Target/R600/AMDGPUCallingConv.td')
-rw-r--r-- | lib/Target/R600/AMDGPUCallingConv.td | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/Target/R600/AMDGPUCallingConv.td b/lib/Target/R600/AMDGPUCallingConv.td index 9c30515..e57b5cd 100644 --- a/lib/Target/R600/AMDGPUCallingConv.td +++ b/lib/Target/R600/AMDGPUCallingConv.td @@ -32,17 +32,21 @@ def CC_SI : CallingConv<[ VGPR8, VGPR9, VGPR10, VGPR11, VGPR12, VGPR13, VGPR14, VGPR15, VGPR16, VGPR17, VGPR18, VGPR19, VGPR20, VGPR21, VGPR22, VGPR23, VGPR24, VGPR25, VGPR26, VGPR27, VGPR28, VGPR29, VGPR30, VGPR31 - ]>>>, + ]>>> + +]>; - // 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 ] - >> +// Calling convention for SI compute kernels +def CC_SI_Kernel : CallingConv<[ + CCIfType<[i64], CCAssignToStack <8, 4>>, + CCIfType<[i32, f32], CCAssignToStack <4, 4>>, + CCIfType<[i16], CCAssignToStack <2, 4>>, + CCIfType<[i8], CCAssignToStack <1, 4>> ]>; def CC_AMDGPU : CallingConv<[ + CCIf<"State.getMachineFunction().getInfo<SIMachineFunctionInfo>()->"# + "ShaderType == ShaderType::COMPUTE", CCDelegateTo<CC_SI_Kernel>>, CCIf<"State.getTarget().getSubtarget<AMDGPUSubtarget>().device()"# "->getGeneration() == AMDGPUDeviceInfo::HD7XXX", CCDelegateTo<CC_SI>> ]>; |