aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx/src/test/spirv_run/extern_func.ptx
diff options
context:
space:
mode:
Diffstat (limited to 'ptx/src/test/spirv_run/extern_func.ptx')
-rw-r--r--ptx/src/test/spirv_run/extern_func.ptx39
1 files changed, 39 insertions, 0 deletions
diff --git a/ptx/src/test/spirv_run/extern_func.ptx b/ptx/src/test/spirv_run/extern_func.ptx
new file mode 100644
index 0000000..5e3a4ce
--- /dev/null
+++ b/ptx/src/test/spirv_run/extern_func.ptx
@@ -0,0 +1,39 @@
+.version 6.5
+.target sm_30
+.address_size 64
+
+.extern .func (.param .align 16 .b8 func_retval0[16]) foobar
+(
+ .param .b64 extern_func
+)
+;
+
+.visible .entry extern_func(
+ .param .u64 input,
+ .param .u64 output
+)
+{
+ .reg .u64 in_addr;
+ .reg .u64 out_addr;
+ .reg .u64 temp;
+ .reg .u64 temp2;
+
+ ld.param.u64 in_addr, [input];
+ ld.param.u64 out_addr, [output];
+
+ ld.global.u64 temp, [in_addr];
+
+ {
+ .param .b64 param0;
+ st.param.b64 [param0+0], temp;
+ .param .align 16 .b8 retval0[16];
+ call.uni (retval0) ,
+ foobar ,
+ (
+ param0
+ );
+ ld.param.u64 temp2, [retval0];
+ }
+ st.u64 [out_addr], temp2;
+ ret;
+}