MCPcopy Create free account
hub / github.com/Inori/GPCS4 / GetScalarType

Function GetScalarType

Tools/ParseOpcode.py:178–202  ·  view source on GitHub ↗
(op_type)

Source from the content-addressed store, hash-verified

176 return dst_type, src_type
177
178def GetScalarType(op_type):
179 result = 'Undefined'
180
181 if op_type in ['B8', 'B16', 'B32', "U8", "U16", "U24", "U32"]:
182 result = 'Uint32'
183 elif op_type in ['B64', 'U64']:
184 result = 'Uint64'
185 elif op_type in ['F16']:
186 result = 'Float16'
187 elif op_type in ['F32']:
188 result = 'Float32'
189 elif op_type in ['F64']:
190 result = 'Float64'
191 elif op_type in ['I4', 'I8', 'I16', "I24", 'I32']:
192 result = 'Sint32'
193 elif op_type in ['I64']:
194 result = 'Sint64'
195 elif op_type in ['B96', 'B128']:
196 result = 'Undefined'
197 elif op_type in ['Undefined']:
198 result = 'Undefined'
199 else:
200 input('error type {}'.format(op_type))
201
202 return result
203
204def GetInstCategory(ins_class):
205 category = ''

Callers 1

WriteOpFormatFunction · 0.85

Calls 2

inputFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected