SPU: Fix spu_itype::zregmod

This commit is contained in:
Elad
2026-02-08 14:53:45 +02:00
parent bbd91dad92
commit f39d82f990
+7 -7
View File
@@ -51,22 +51,22 @@ struct spu_itype
RDCH, RDCH,
RCHCNT, RCHCNT,
BR, // branch_tag first BR, // branch_tag first, zregmod_tag (2) first
BRA, BRA,
BRNZ, BRNZ,
BRZ, BRZ,
BRHNZ, BRHNZ,
BRHZ, BRHZ,
BRSL,
BRASL,
IRET, IRET,
BI, BI,
BISLED, BISLED,
BISL,
BIZ, BIZ,
BINZ, BINZ,
BIHZ, BIHZ,
BIHNZ, // branch_tag last BIHNZ, // zregmod_tag (2) last
BRSL,
BRASL,
BISL, // branch_tag last
ILH, // constant_tag_first ILH, // constant_tag_first
ILHU, ILHU,
@@ -245,7 +245,7 @@ struct spu_itype
// Test for branch instruction // Test for branch instruction
friend constexpr bool operator &(type value, branch_tag) friend constexpr bool operator &(type value, branch_tag)
{ {
return value >= BR && value <= BIHNZ; return value >= BR && value <= BISL;
} }
// Test for floating point instruction // Test for floating point instruction
@@ -299,7 +299,7 @@ struct spu_itype
// Test for non register-modifying instruction // Test for non register-modifying instruction
friend constexpr bool operator &(type value, zregmod_tag) friend constexpr bool operator &(type value, zregmod_tag)
{ {
return value >= HEQ && value <= STQR; return (value >= HEQ && value <= STQR) || (value >= BR && value <= BIHNZ);
} }
}; };