Add special handling for known OPR instructions

This commit is contained in:
Yoshi Askharoun
2025-09-21 21:19:14 -05:00
parent ebb41f0384
commit 7cc0702c14
5 changed files with 31 additions and 9 deletions
+4
View File
@@ -14,6 +14,7 @@ public enum LiteralDataType : byte
Int32 = 0b0011,
Bytes = 0b0100,
Operation = 0b0101,
TypeIndex = 0b1000,
PropertyIndex = 0b1001,
@@ -41,6 +42,9 @@ public record OperandLiteral : Operand
public static LiteralDataType ReduceDataType(LiteralDataType dataType)
{
if (dataType is LiteralDataType.Operation)
return LiteralDataType.Byte;
return IsIndex(dataType) ? LiteralDataType.UInt16 : dataType;
}