diff options
| author | 2020-03-28 03:55:04 -0300 | |
|---|---|---|
| committer | 2020-03-28 03:55:04 -0300 | |
| commit | 5300a918c60243ad3f3f9a145f0c8f495738e79f (patch) | |
| tree | 9b92160c1b6d54db476bfc9b0dc9a4f24bf30848 /src | |
| parent | shader/lea: Fix op_a and op_b usages (diff) | |
| download | yuzu-5300a918c60243ad3f3f9a145f0c8f495738e79f.tar.gz yuzu-5300a918c60243ad3f3f9a145f0c8f495738e79f.tar.xz yuzu-5300a918c60243ad3f3f9a145f0c8f495738e79f.zip | |
shader/lea: Simplify generated LEA code
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/arithmetic_integer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index 41ddc6221..0f4c3103a 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp | |||
| @@ -271,9 +271,8 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { | |||
| 271 | UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex), | 271 | UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex), |
| 272 | "Unhandled LEA Predicate"); | 272 | "Unhandled LEA Predicate"); |
| 273 | 273 | ||
| 274 | Node shifted_c = Operation(OperationCode::ILogicalShiftLeft, Immediate(1), std::move(op_c)); | 274 | Node value = Operation(OperationCode::ILogicalShiftLeft, std::move(op_a), std::move(op_c)); |
| 275 | Node mul_bc = Operation(OperationCode::IMul, std::move(op_a), std::move(shifted_c)); | 275 | value = Operation(OperationCode::IAdd, std::move(op_b), std::move(value)); |
| 276 | Node value = Operation(OperationCode::IAdd, std::move(op_b), std::move(mul_bc)); | ||
| 277 | SetRegister(bb, instr.gpr0, std::move(value)); | 276 | SetRegister(bb, instr.gpr0, std::move(value)); |
| 278 | 277 | ||
| 279 | break; | 278 | break; |