summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/opcode.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir/opcode.inc')
-rw-r--r--src/shader_recompiler/frontend/ir/opcode.inc139
1 files changed, 93 insertions, 46 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcode.inc b/src/shader_recompiler/frontend/ir/opcode.inc
index 40759e96a..4ecb5e936 100644
--- a/src/shader_recompiler/frontend/ir/opcode.inc
+++ b/src/shader_recompiler/frontend/ir/opcode.inc
@@ -35,6 +35,12 @@ OPCODE(SetZFlag, Void, U1,
35OPCODE(SetSFlag, Void, U1, ) 35OPCODE(SetSFlag, Void, U1, )
36OPCODE(SetCFlag, Void, U1, ) 36OPCODE(SetCFlag, Void, U1, )
37OPCODE(SetOFlag, Void, U1, ) 37OPCODE(SetOFlag, Void, U1, )
38OPCODE(WorkgroupIdX, U32, )
39OPCODE(WorkgroupIdY, U32, )
40OPCODE(WorkgroupIdZ, U32, )
41OPCODE(LocalInvocationIdX, U32, )
42OPCODE(LocalInvocationIdY, U32, )
43OPCODE(LocalInvocationIdZ, U32, )
38 44
39// Undefined 45// Undefined
40OPCODE(Undef1, U1, ) 46OPCODE(Undef1, U1, )
@@ -44,6 +50,13 @@ OPCODE(Undef32, U32,
44OPCODE(Undef64, U64, ) 50OPCODE(Undef64, U64, )
45 51
46// Memory operations 52// Memory operations
53OPCODE(LoadGlobalU8, U32, U64, )
54OPCODE(LoadGlobalS8, U32, U64, )
55OPCODE(LoadGlobalU16, U32, U64, )
56OPCODE(LoadGlobalS16, U32, U64, )
57OPCODE(LoadGlobal32, U32, U64, )
58OPCODE(LoadGlobal64, Opaque, U64, )
59OPCODE(LoadGlobal128, Opaque, U64, )
47OPCODE(WriteGlobalU8, Void, U64, U32, ) 60OPCODE(WriteGlobalU8, Void, U64, U32, )
48OPCODE(WriteGlobalS8, Void, U64, U32, ) 61OPCODE(WriteGlobalS8, Void, U64, U32, )
49OPCODE(WriteGlobalU16, Void, U64, U32, ) 62OPCODE(WriteGlobalU16, Void, U64, U32, )
@@ -58,6 +71,12 @@ OPCODE(CompositeConstruct3, Opaque, Opaq
58OPCODE(CompositeConstruct4, Opaque, Opaque, Opaque, Opaque, Opaque, ) 71OPCODE(CompositeConstruct4, Opaque, Opaque, Opaque, Opaque, Opaque, )
59OPCODE(CompositeExtract, Opaque, Opaque, U32, ) 72OPCODE(CompositeExtract, Opaque, Opaque, U32, )
60 73
74// Select operations
75OPCODE(Select8, U8, U1, U8, U8, )
76OPCODE(Select16, U16, U1, U16, U16, )
77OPCODE(Select32, U32, U1, U32, U32, )
78OPCODE(Select64, U64, U1, U64, U64, )
79
61// Bitwise conversions 80// Bitwise conversions
62OPCODE(PackUint2x32, U64, Opaque, ) 81OPCODE(PackUint2x32, U64, Opaque, )
63OPCODE(UnpackUint2x32, Opaque, U64, ) 82OPCODE(UnpackUint2x32, Opaque, U64, )
@@ -74,56 +93,84 @@ OPCODE(GetOverflowFromOp, U1, Opaq
74OPCODE(GetZSCOFromOp, ZSCO, Opaque, ) 93OPCODE(GetZSCOFromOp, ZSCO, Opaque, )
75 94
76// Floating-point operations 95// Floating-point operations
77OPCODE(FPAbs16, U16, U16 ) 96OPCODE(FPAbs16, U16, U16, )
78OPCODE(FPAbs32, U32, U32 ) 97OPCODE(FPAbs32, U32, U32, )
79OPCODE(FPAbs64, U64, U64 ) 98OPCODE(FPAbs64, U64, U64, )
80OPCODE(FPAdd16, U16, U16, U16 ) 99OPCODE(FPAdd16, U16, U16, U16, )
81OPCODE(FPAdd32, U32, U32, U32 ) 100OPCODE(FPAdd32, U32, U32, U32, )
82OPCODE(FPAdd64, U64, U64, U64 ) 101OPCODE(FPAdd64, U64, U64, U64, )
83OPCODE(FPFma16, U16, U16, U16 ) 102OPCODE(FPFma16, U16, U16, U16, U16, )
84OPCODE(FPFma32, U32, U32, U32 ) 103OPCODE(FPFma32, U32, U32, U32, U32, )
85OPCODE(FPFma64, U64, U64, U64 ) 104OPCODE(FPFma64, U64, U64, U64, U64, )
86OPCODE(FPMax32, U32, U32, U32 ) 105OPCODE(FPMax32, U32, U32, U32, )
87OPCODE(FPMax64, U64, U64, U64 ) 106OPCODE(FPMax64, U64, U64, U64, )
88OPCODE(FPMin32, U32, U32, U32 ) 107OPCODE(FPMin32, U32, U32, U32, )
89OPCODE(FPMin64, U64, U64, U64 ) 108OPCODE(FPMin64, U64, U64, U64, )
90OPCODE(FPMul16, U16, U16, U16 ) 109OPCODE(FPMul16, U16, U16, U16, )
91OPCODE(FPMul32, U32, U32, U32 ) 110OPCODE(FPMul32, U32, U32, U32, )
92OPCODE(FPMul64, U64, U64, U64 ) 111OPCODE(FPMul64, U64, U64, U64, )
93OPCODE(FPNeg16, U16, U16 ) 112OPCODE(FPNeg16, U16, U16, )
94OPCODE(FPNeg32, U32, U32 ) 113OPCODE(FPNeg32, U32, U32, )
95OPCODE(FPNeg64, U64, U64 ) 114OPCODE(FPNeg64, U64, U64, )
96OPCODE(FPRecip32, U32, U32 ) 115OPCODE(FPRecip32, U32, U32, )
97OPCODE(FPRecip64, U64, U64 ) 116OPCODE(FPRecip64, U64, U64, )
98OPCODE(FPRecipSqrt32, U32, U32 ) 117OPCODE(FPRecipSqrt32, U32, U32, )
99OPCODE(FPRecipSqrt64, U64, U64 ) 118OPCODE(FPRecipSqrt64, U64, U64, )
100OPCODE(FPSqrt, U32, U32 ) 119OPCODE(FPSqrt, U32, U32, )
101OPCODE(FPSin, U32, U32 ) 120OPCODE(FPSin, U32, U32, )
102OPCODE(FPSinNotReduced, U32, U32 ) 121OPCODE(FPSinNotReduced, U32, U32, )
103OPCODE(FPExp2, U32, U32 ) 122OPCODE(FPExp2, U32, U32, )
104OPCODE(FPExp2NotReduced, U32, U32 ) 123OPCODE(FPExp2NotReduced, U32, U32, )
105OPCODE(FPCos, U32, U32 ) 124OPCODE(FPCos, U32, U32, )
106OPCODE(FPCosNotReduced, U32, U32 ) 125OPCODE(FPCosNotReduced, U32, U32, )
107OPCODE(FPLog2, U32, U32 ) 126OPCODE(FPLog2, U32, U32, )
108OPCODE(FPSaturate16, U16, U16 ) 127OPCODE(FPSaturate16, U16, U16, )
109OPCODE(FPSaturate32, U32, U32 ) 128OPCODE(FPSaturate32, U32, U32, )
110OPCODE(FPSaturate64, U64, U64 ) 129OPCODE(FPSaturate64, U64, U64, )
111OPCODE(FPRoundEven16, U16, U16 ) 130OPCODE(FPRoundEven16, U16, U16, )
112OPCODE(FPRoundEven32, U32, U32 ) 131OPCODE(FPRoundEven32, U32, U32, )
113OPCODE(FPRoundEven64, U64, U64 ) 132OPCODE(FPRoundEven64, U64, U64, )
114OPCODE(FPFloor16, U16, U16 ) 133OPCODE(FPFloor16, U16, U16, )
115OPCODE(FPFloor32, U32, U32 ) 134OPCODE(FPFloor32, U32, U32, )
116OPCODE(FPFloor64, U64, U64 ) 135OPCODE(FPFloor64, U64, U64, )
117OPCODE(FPCeil16, U16, U16 ) 136OPCODE(FPCeil16, U16, U16, )
118OPCODE(FPCeil32, U32, U32 ) 137OPCODE(FPCeil32, U32, U32, )
119OPCODE(FPCeil64, U64, U64 ) 138OPCODE(FPCeil64, U64, U64, )
120OPCODE(FPTrunc16, U16, U16 ) 139OPCODE(FPTrunc16, U16, U16, )
121OPCODE(FPTrunc32, U32, U32 ) 140OPCODE(FPTrunc32, U32, U32, )
122OPCODE(FPTrunc64, U64, U64 ) 141OPCODE(FPTrunc64, U64, U64, )
142
143// Integer operations
144OPCODE(IAdd32, U32, U32, U32, )
145OPCODE(IAdd64, U64, U64, U64, )
146OPCODE(IMul32, U32, U32, U32, )
147OPCODE(INeg32, U32, U32, )
148OPCODE(IAbs32, U32, U32, )
149OPCODE(ShiftLeftLogical32, U32, U32, U32, )
150OPCODE(ShiftRightLogical32, U32, U32, U32, )
151OPCODE(ShiftRightArithmetic32, U32, U32, U32, )
152OPCODE(BitwiseAnd32, U32, U32, U32, )
153OPCODE(BitwiseOr32, U32, U32, U32, )
154OPCODE(BitwiseXor32, U32, U32, U32, )
155OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, )
156OPCODE(BitFieldSExtract, U32, U32, U32, U32, )
157OPCODE(BitFieldUExtract, U32, U32, U32, U32, )
158
159OPCODE(SLessThan, U1, U32, U32, )
160OPCODE(ULessThan, U1, U32, U32, )
161OPCODE(IEqual, U1, U32, U32, )
162OPCODE(SLessThanEqual, U1, U32, U32, )
163OPCODE(ULessThanEqual, U1, U32, U32, )
164OPCODE(SGreaterThan, U1, U32, U32, )
165OPCODE(UGreaterThan, U1, U32, U32, )
166OPCODE(INotEqual, U1, U32, U32, )
167OPCODE(SGreaterThanEqual, U1, U32, U32, )
168OPCODE(UGreaterThanEqual, U1, U32, U32, )
123 169
124// Logical operations 170// Logical operations
125OPCODE(LogicalOr, U1, U1, U1, ) 171OPCODE(LogicalOr, U1, U1, U1, )
126OPCODE(LogicalAnd, U1, U1, U1, ) 172OPCODE(LogicalAnd, U1, U1, U1, )
173OPCODE(LogicalXor, U1, U1, U1, )
127OPCODE(LogicalNot, U1, U1, ) 174OPCODE(LogicalNot, U1, U1, )
128 175
129// Conversion operations 176// Conversion operations