SPUAnalyzer.h: Add missing category check functions (#12222)

Some instructions were moved into integer category.
This commit is contained in:
Elad Ashkenazi 2022-06-14 16:04:24 +03:00 committed by GitHub
parent cefc37a553
commit 5378fee1c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 40 additions and 10 deletions

View File

@ -68,19 +68,10 @@ struct spu_itype
STQA,
STQR, // memory_tag last
CBD, // constant_tag first
CBX,
CHD,
CHX,
CWD,
CWX,
CDD,
CDX,
ILH,
ILH, // constant_tag_first
ILHU,
IL,
ILA,
IOHL,
FSMBI, // constant_tag last
AH, // integer_tag first
@ -107,6 +98,14 @@ struct spu_itype
MPYHHA,
MPYHHU,
MPYHHAU,
CBD,
CHD,
CWD,
CDD,
CBX,
CHX,
CWX,
CDX,
CLZ,
CNTB,
FSMB,
@ -130,6 +129,7 @@ struct spu_itype
ORC,
ORBI,
ORHI,
IOHL,
ORI,
ORX,
XOR,
@ -263,6 +263,36 @@ struct spu_itype
{
return value >= FMA && value <= FRDS;
}
// Test for memory instruction
friend constexpr bool operator &(type value, memory_tag)
{
return value >= LQD && value <= STQR;
}
// Test for compare instruction
friend constexpr bool operator &(type value, compare_tag)
{
return value >= CEQB && value <= CLGTI;
}
// Test for integer instruction
friend constexpr bool operator &(type value, integer_tag)
{
return value >= AH && value <= SHUFB;
}
// Test for shift or rotate instruction
friend constexpr bool operator &(type value, shiftrot_tag)
{
return value >= SHLH && value <= ROTMAI;
}
// Test for constant loading instruction
friend constexpr bool operator &(type value, constant_tag)
{
return value >= CBD && value <= FSMBI;
}
};
struct spu_iflag