summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-09 23:03:01 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:30 +0200
commit4502595bc2518eecf934110e9393b11bf0c2f75a (patch)
tree3e75e200936bce393152792b9ba90413ea83482c /src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
parentglasm: Implement GLASM fp16 packing and move bitwise insns (diff)
downloadyuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.gz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.bz2
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.lz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.xz
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.tar.zst
yuzu-4502595bc2518eecf934110e9393b11bf0c2f75a.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
index 8ef0f7c17..0c6a6e1c8 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp
@@ -17,9 +17,9 @@ void StorageOp(EmitContext& ctx, const IR::Value& binding, ScalarU32 offset,
// address = c[binding].xy
// length = c[binding].z
const u32 sb_binding{binding.U32()};
- ctx.Add("PK64.U LC,c[{}];" // pointer = address
- "CVT.U64.U32 LC.z,{};" // offset = uint64_t(offset)
- "ADD.U64 LC.x,LC.x,LC.z;" // pointer += offset
+ ctx.Add("PK64.U DC,c[{}];" // pointer = address
+ "CVT.U64.U32 DC.z,{};" // offset = uint64_t(offset)
+ "ADD.U64 DC.x,DC.x,DC.z;" // pointer += offset
"SLT.U.CC RC.x,{},c[{}].z;", // cc = offset < length
sb_binding, offset, offset, sb_binding);
if (else_expr.empty()) {
@@ -32,13 +32,13 @@ void StorageOp(EmitContext& ctx, const IR::Value& binding, ScalarU32 offset,
template <typename ValueType>
void Store(EmitContext& ctx, const IR::Value& binding, ScalarU32 offset, ValueType value,
std::string_view size) {
- StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},LC.x;", size, value));
+ StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},DC.x;", size, value));
}
void Load(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU32 offset,
std::string_view size) {
const Register ret{ctx.reg_alloc.Define(inst)};
- StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},LC.x;", size, ret),
+ StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},DC.x;", size, ret),
fmt::format("MOV.U {},{{0,0,0,0}};", ret));
}
} // Anonymous namespace