shader_bytecode: Add decodings for i2i instructions.
This commit is contained in:
parent
a7b5ab4d9a
commit
f2dcb39049
@ -25,6 +25,13 @@ struct Register {
|
|||||||
/// Register 255 is special cased to always be 0
|
/// Register 255 is special cased to always be 0
|
||||||
static constexpr size_t ZeroIndex = 255;
|
static constexpr size_t ZeroIndex = 255;
|
||||||
|
|
||||||
|
enum class Size : u64 {
|
||||||
|
Byte = 0,
|
||||||
|
Short = 1,
|
||||||
|
Word = 2,
|
||||||
|
Long = 3,
|
||||||
|
};
|
||||||
|
|
||||||
constexpr Register() = default;
|
constexpr Register() = default;
|
||||||
|
|
||||||
constexpr Register(u64 value) : value(value) {}
|
constexpr Register(u64 value) : value(value) {}
|
||||||
@ -236,6 +243,15 @@ union Instruction {
|
|||||||
BitField<56, 1, u64> neg_imm;
|
BitField<56, 1, u64> neg_imm;
|
||||||
} fset;
|
} fset;
|
||||||
|
|
||||||
|
union {
|
||||||
|
BitField<10, 2, Register::Size> size;
|
||||||
|
BitField<13, 1, u64> is_signed;
|
||||||
|
BitField<41, 2, u64> selector;
|
||||||
|
BitField<45, 1, u64> negate_a;
|
||||||
|
BitField<49, 1, u64> abs_a;
|
||||||
|
BitField<50, 1, u64> saturate_a;
|
||||||
|
} i2i;
|
||||||
|
|
||||||
BitField<61, 1, u64> is_b_imm;
|
BitField<61, 1, u64> is_b_imm;
|
||||||
BitField<60, 1, u64> is_b_gpr;
|
BitField<60, 1, u64> is_b_gpr;
|
||||||
BitField<59, 1, u64> is_c_gpr;
|
BitField<59, 1, u64> is_c_gpr;
|
||||||
@ -314,6 +330,7 @@ public:
|
|||||||
FloatSet,
|
FloatSet,
|
||||||
FloatSetPredicate,
|
FloatSetPredicate,
|
||||||
IntegerSetPredicate,
|
IntegerSetPredicate,
|
||||||
|
I2I,
|
||||||
Unknown,
|
Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -438,9 +455,6 @@ private:
|
|||||||
INST("0100110010111---", Id::I2F_C, Type::Arithmetic, "I2F_C"),
|
INST("0100110010111---", Id::I2F_C, Type::Arithmetic, "I2F_C"),
|
||||||
INST("0101110010111---", Id::I2F_R, Type::Arithmetic, "I2F_R"),
|
INST("0101110010111---", Id::I2F_R, Type::Arithmetic, "I2F_R"),
|
||||||
INST("0011100-10111---", Id::I2F_IMM, Type::Arithmetic, "I2F_IMM"),
|
INST("0011100-10111---", Id::I2F_IMM, Type::Arithmetic, "I2F_IMM"),
|
||||||
INST("0100110011100---", Id::I2I_C, Type::Arithmetic, "I2I_C"),
|
|
||||||
INST("0101110011100---", Id::I2I_R, Type::Arithmetic, "I2I_R"),
|
|
||||||
INST("01110001-1000---", Id::I2I_IMM, Type::Arithmetic, "I2I_IMM"),
|
|
||||||
INST("000001----------", Id::LOP32I, Type::Arithmetic, "LOP32I"),
|
INST("000001----------", Id::LOP32I, Type::Arithmetic, "LOP32I"),
|
||||||
INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"),
|
INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"),
|
||||||
INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"),
|
INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"),
|
||||||
@ -449,6 +463,9 @@ private:
|
|||||||
INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"),
|
INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"),
|
||||||
INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"),
|
INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"),
|
||||||
INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"),
|
INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"),
|
||||||
|
INST("0100110011100---", Id::I2I_C, Type::I2I, "I2I_C"),
|
||||||
|
INST("0101110011100---", Id::I2I_R, Type::I2I, "I2I_R"),
|
||||||
|
INST("01110001-1000---", Id::I2I_IMM, Type::I2I, "I2I_IMM"),
|
||||||
INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"),
|
INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"),
|
||||||
INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"),
|
INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"),
|
||||||
INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"),
|
INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"),
|
||||||
|
Loading…
Reference in New Issue
Block a user