diff options
Diffstat (limited to 'ptx/src/test/spirv_run/shared_unify_extern.ptx')
-rw-r--r-- | ptx/src/test/spirv_run/shared_unify_extern.ptx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ptx/src/test/spirv_run/shared_unify_extern.ptx b/ptx/src/test/spirv_run/shared_unify_extern.ptx new file mode 100644 index 0000000..8b406b2 --- /dev/null +++ b/ptx/src/test/spirv_run/shared_unify_extern.ptx @@ -0,0 +1,34 @@ +.version 6.5
+.target sm_30
+.address_size 64
+
+.extern .shared .b32 shared_ex[];
+.shared .b32 shared_mod[4];
+
+
+.func (.reg .b64 out) load_from_shared()
+{
+ ld.shared.u64 out, [shared_mod];
+ ret;
+}
+
+.visible .entry shared_unify_extern(
+ .param .u64 input,
+ .param .u64 output
+)
+{
+ .reg .u64 in_addr;
+ .reg .u64 out_addr;
+ .reg .u64 temp1;
+ .reg .u64 temp2;
+
+ ld.param.u64 in_addr, [input];
+ ld.param.u64 out_addr, [output];
+
+ ld.u64 temp1, [in_addr];
+ st.shared.u64 [shared_ex], temp1;
+ call (temp2), load_from_shared;
+ add.u64 temp2, temp2, temp1;
+ st.u64 [out_addr], temp2;
+ ret;
+}
|