mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
shader_decode: Implement ISCADD
This commit is contained in:
parent
b0e7920838
commit
210620ff31
1 changed files with 15 additions and 0 deletions
|
@ -41,6 +41,21 @@ u32 ShaderIR::DecodeArithmeticInteger(BasicBlock& bb, u32 pc) {
|
||||||
SetRegister(bb, instr.gpr0, Operation(OperationCode::IAdd, PRECISE, op_a, op_b));
|
SetRegister(bb, instr.gpr0, Operation(OperationCode::IAdd, PRECISE, op_a, op_b));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case OpCode::Id::ISCADD_C:
|
||||||
|
case OpCode::Id::ISCADD_R:
|
||||||
|
case OpCode::Id::ISCADD_IMM: {
|
||||||
|
UNIMPLEMENTED_IF_MSG(instr.generates_cc,
|
||||||
|
"Condition codes generation in ISCADD is not implemented");
|
||||||
|
|
||||||
|
op_a = GetOperandAbsNegInteger(op_a, false, instr.alu_integer.negate_a, true);
|
||||||
|
op_b = GetOperandAbsNegInteger(op_b, false, instr.alu_integer.negate_b, true);
|
||||||
|
|
||||||
|
const Node shift = Immediate(static_cast<u32>(instr.alu_integer.shift_amount));
|
||||||
|
const Node shifted_a = Operation(OperationCode::ILogicalShiftLeft, NO_PRECISE, op_a, shift);
|
||||||
|
const Node value = Operation(OperationCode::IAdd, NO_PRECISE, shifted_a, op_b);
|
||||||
|
SetRegister(bb, instr.gpr0, value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case OpCode::Id::SEL_C:
|
case OpCode::Id::SEL_C:
|
||||||
case OpCode::Id::SEL_R:
|
case OpCode::Id::SEL_R:
|
||||||
case OpCode::Id::SEL_IMM: {
|
case OpCode::Id::SEL_IMM: {
|
||||||
|
|
Loading…
Reference in a new issue