mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 07:12:46 +01:00
shader/lea: Simplify generated LEA code
This commit is contained in:
parent
523a709bf1
commit
5300a918c6
1 changed files with 2 additions and 3 deletions
|
@ -271,9 +271,8 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
|
||||||
UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex),
|
UNIMPLEMENTED_IF_MSG(instr.lea.pred48 != static_cast<u64>(Pred::UnusedIndex),
|
||||||
"Unhandled LEA Predicate");
|
"Unhandled LEA Predicate");
|
||||||
|
|
||||||
Node shifted_c = Operation(OperationCode::ILogicalShiftLeft, Immediate(1), std::move(op_c));
|
Node value = Operation(OperationCode::ILogicalShiftLeft, std::move(op_a), std::move(op_c));
|
||||||
Node mul_bc = Operation(OperationCode::IMul, std::move(op_a), std::move(shifted_c));
|
value = Operation(OperationCode::IAdd, std::move(op_b), std::move(value));
|
||||||
Node value = Operation(OperationCode::IAdd, std::move(op_b), std::move(mul_bc));
|
|
||||||
SetRegister(bb, instr.gpr0, std::move(value));
|
SetRegister(bb, instr.gpr0, std::move(value));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue