Fix one-off bug with user data registers.

This commit is contained in:
squidbus 2024-07-14 03:52:43 -07:00 committed by TheTurtle
parent 66fa29059c
commit 6a6d5bad42
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ void Translator::EmitPrologue() {
// Initialize user data.
IR::ScalarReg dst_sreg = IR::ScalarReg::S0;
for (u32 i = 0; i < info.num_user_data; i++) {
ir.SetScalarReg(dst_sreg++, ir.GetUserData(dst_sreg));
ir.SetScalarReg(dst_sreg, ir.GetUserData(dst_sreg));
++dst_sreg;
}
IR::VectorReg dst_vreg = IR::VectorReg::V0;