aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-05-15 23:05:59 +0200
committerAndrzej Janik <[email protected]>2020-05-15 23:05:59 +0200
commit76afdc108129878636c131191a09dec8f31af1fa (patch)
treefcf08adf4f4a8eefefe854a64b679dc35beac9c1
parent531cefce36a9f8ba53e8b339a74fa2dd2dd38935 (diff)
downloadZLUDA-76afdc108129878636c131191a09dec8f31af1fa.tar.gz
ZLUDA-76afdc108129878636c131191a09dec8f31af1fa.zip
Remove hacks in the ops emission
-rw-r--r--ptx/src/translate.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ptx/src/translate.rs b/ptx/src/translate.rs
index 90bd87c..cc2b890 100644
--- a/ptx/src/translate.rs
+++ b/ptx/src/translate.rs
@@ -247,7 +247,7 @@ fn emit_function_body_ops(
builder,
SpirvType::Pointer(data.typ, spirv::StorageClass::CrossWorkgroup),
);
- let bitcast = builder.convert_u_to_ptr(ptr_result_type, None, src - 5)?;
+ let bitcast = builder.convert_u_to_ptr(ptr_result_type, None, src)?;
builder.load(
result_type,
Some(arg.dst + id_offset),
@@ -257,7 +257,7 @@ fn emit_function_body_ops(
)?;
}
ast::LdStateSpace::Param => {
- //builder.copy_object(result_type, Some(arg.dst + id_offset), src)?;
+ builder.copy_object(result_type, Some(arg.dst + id_offset), src)?;
}
_ => todo!(),
}
@@ -279,7 +279,7 @@ fn emit_function_body_ops(
SpirvType::Pointer(data.typ, spirv::StorageClass::CrossWorkgroup),
);
let bitcast =
- builder.convert_u_to_ptr(ptr_result_type, None, arg.dst + id_offset - 5)?;
+ builder.convert_u_to_ptr(ptr_result_type, None, arg.dst + id_offset)?;
builder.store(bitcast, src, None, &[])?;
}
// SPIR-V does not support ret as guaranteed-converged