|
@@ -1367,6 +1367,20 @@ union Instruction {
|
|
|
}
|
|
}
|
|
|
} bra;
|
|
} bra;
|
|
|
|
|
|
|
|
|
|
+ union {
|
|
|
|
|
+ BitField<20, 24, u64> target;
|
|
|
|
|
+ BitField<5, 1, u64> constant_buffer;
|
|
|
|
|
+
|
|
|
|
|
+ s32 GetBranchExtend() const {
|
|
|
|
|
+ // Sign extend the branch target offset
|
|
|
|
|
+ u32 mask = 1U << (24 - 1);
|
|
|
|
|
+ u32 value = static_cast<u32>(target);
|
|
|
|
|
+ // The branch offset is relative to the next instruction and is stored in bytes, so
|
|
|
|
|
+ // divide it by the size of an instruction and add 1 to it.
|
|
|
|
|
+ return static_cast<s32>((value ^ mask) - mask) / sizeof(Instruction) + 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ } brx;
|
|
|
|
|
+
|
|
|
union {
|
|
union {
|
|
|
BitField<39, 1, u64> emit; // EmitVertex
|
|
BitField<39, 1, u64> emit; // EmitVertex
|
|
|
BitField<40, 1, u64> cut; // EndPrimitive
|
|
BitField<40, 1, u64> cut; // EndPrimitive
|
|
@@ -1464,6 +1478,7 @@ public:
|
|
|
BFE_IMM,
|
|
BFE_IMM,
|
|
|
BFI_IMM_R,
|
|
BFI_IMM_R,
|
|
|
BRA,
|
|
BRA,
|
|
|
|
|
+ BRX,
|
|
|
PBK,
|
|
PBK,
|
|
|
LD_A,
|
|
LD_A,
|
|
|
LD_L,
|
|
LD_L,
|
|
@@ -1738,6 +1753,7 @@ private:
|
|
|
INST("111000101001----", Id::SSY, Type::Flow, "SSY"),
|
|
INST("111000101001----", Id::SSY, Type::Flow, "SSY"),
|
|
|
INST("111000101010----", Id::PBK, Type::Flow, "PBK"),
|
|
INST("111000101010----", Id::PBK, Type::Flow, "PBK"),
|
|
|
INST("111000100100----", Id::BRA, Type::Flow, "BRA"),
|
|
INST("111000100100----", Id::BRA, Type::Flow, "BRA"),
|
|
|
|
|
+ INST("111000100101----", Id::BRX, Type::Flow, "BRX"),
|
|
|
INST("1111000011111---", Id::SYNC, Type::Flow, "SYNC"),
|
|
INST("1111000011111---", Id::SYNC, Type::Flow, "SYNC"),
|
|
|
INST("111000110100---", Id::BRK, Type::Flow, "BRK"),
|
|
INST("111000110100---", Id::BRK, Type::Flow, "BRK"),
|
|
|
INST("111000110000----", Id::EXIT, Type::Flow, "EXIT"),
|
|
INST("111000110000----", Id::EXIT, Type::Flow, "EXIT"),
|