1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

AMDGPU: Error on calls from graphics shaders

In principle nothing should stop these from working, but
work is necessary to create an ABI for dealing with the stack
related registers.

llvm-svn: 335829
This commit is contained in:
Matt Arsenault 2018-06-28 10:18:36 +00:00
parent c4c4be3926
commit c8324b4087
2 changed files with 14 additions and 0 deletions

View File

@ -2310,6 +2310,13 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI,
"unsupported required tail call to function ");
}
if (AMDGPU::isShader(MF.getFunction().getCallingConv())) {
// Note the issue is with the CC of the calling function, not of the call
// itself.
return lowerUnhandledCall(CLI, InVals,
"unsupported call from graphics shader of function ");
}
// The first 4 bytes are reserved for the callee's emergency stack slot.
const unsigned CalleeUsableStackOffset = 4;

View File

@ -67,3 +67,10 @@ define void @test_indirect_call(void()* %fptr) {
call void %fptr()
ret void
}
; GCN: :0:0: in function test_call_from_shader i32 (): unsupported call from graphics shader of function defined_function
; R600: in function test_call{{.*}}: unsupported call to function defined_function
define amdgpu_ps i32 @test_call_from_shader() {
%call = call i32 @defined_function(i32 0)
ret i32 %call
}