Opcodes massiv erweitert
This commit is contained in:
@ -30,16 +30,25 @@ public static class Bytecode {
|
||||
public const byte ADD_REAL = 0x40; public const byte SUB_REAL = 0x41; public const byte MUL_REAL = 0x42; public const byte DIV_REAL = 0x43;
|
||||
public const byte ADD_LREAL = 0x44; public const byte SUB_LREAL = 0x45; public const byte MUL_LREAL = 0x46; public const byte DIV_LREAL = 0x47;
|
||||
|
||||
// Comparisons signed
|
||||
public const byte LT_S = 0x50; public const byte GT_S = 0x51; public const byte LE_S = 0x52; public const byte GE_S = 0x53; public const byte EQ_S = 0x54; public const byte NEQ_S = 0x55;
|
||||
// Comparisons unsigned
|
||||
public const byte LT_U = 0x56; public const byte GT_U = 0x57; public const byte LE_U = 0x58; public const byte GE_U = 0x59; public const byte EQ_U = 0x5A; public const byte NEQ_U = 0x5B;
|
||||
// Comparisons floating
|
||||
public const byte LT_F = 0x5C; public const byte GT_F = 0x5D; public const byte LE_F = 0x5E; public const byte GE_F = 0x5F; public const byte EQ_F = 0x60; public const byte NEQ_F = 0x61;
|
||||
// Signed integer comparisons
|
||||
public const byte LT_SINT = 0x50; public const byte GT_SINT = 0x51; public const byte LE_SINT = 0x52; public const byte GE_SINT = 0x53; public const byte EQ_SINT = 0x54; public const byte NEQ_SINT = 0x55;
|
||||
public const byte LT_INT = 0x56; public const byte GT_INT = 0x57; public const byte LE_INT = 0x58; public const byte GE_INT = 0x59; public const byte EQ_INT = 0x5A; public const byte NEQ_INT = 0x5B;
|
||||
public const byte LT_DINT = 0x5C; public const byte GT_DINT = 0x5D; public const byte LE_DINT = 0x5E; public const byte GE_DINT = 0x5F; public const byte EQ_DINT = 0x60; public const byte NEQ_DINT = 0x61;
|
||||
public const byte LT_LINT = 0x62; public const byte GT_LINT = 0x63; public const byte LE_LINT = 0x64; public const byte GE_LINT = 0x65; public const byte EQ_LINT = 0x66; public const byte NEQ_LINT = 0x67;
|
||||
|
||||
// Unsigned integer comparisons
|
||||
public const byte LT_USINT = 0x70; public const byte GT_USINT = 0x71; public const byte LE_USINT = 0x72; public const byte GE_USINT = 0x73; public const byte EQ_USINT = 0x74; public const byte NEQ_USINT = 0x75;
|
||||
public const byte LT_UINT = 0x76; public const byte GT_UINT = 0x77; public const byte LE_UINT = 0x78; public const byte GE_UINT = 0x79; public const byte EQ_UINT = 0x7A; public const byte NEQ_UINT = 0x7B;
|
||||
public const byte LT_UDINT = 0x7C; public const byte GT_UDINT = 0x7D; public const byte LE_UDINT = 0x7E; public const byte GE_UDINT = 0x7F; public const byte EQ_UDINT = 0x80; public const byte NEQ_UDINT = 0x81;
|
||||
public const byte LT_ULINT = 0x82; public const byte GT_ULINT = 0x83; public const byte LE_ULINT = 0x84; public const byte GE_ULINT = 0x85; public const byte EQ_ULINT = 0x86; public const byte NEQ_ULINT = 0x87;
|
||||
|
||||
// Floating point comparisons
|
||||
public const byte LT_REAL = 0x90; public const byte GT_REAL = 0x91; public const byte LE_REAL = 0x92; public const byte GE_REAL = 0x93; public const byte EQ_REAL = 0x94; public const byte NEQ_REAL = 0x95;
|
||||
public const byte LT_LREAL = 0x96; public const byte GT_LREAL = 0x97; public const byte LE_LREAL = 0x98; public const byte GE_LREAL = 0x99; public const byte EQ_LREAL = 0x9A; public const byte NEQ_LREAL = 0x9B;
|
||||
|
||||
// Control flow
|
||||
public const byte JZ = 0x70;
|
||||
public const byte JMP = 0x71;
|
||||
public const byte JZ = 0xA0;
|
||||
public const byte JMP = 0xA1;
|
||||
|
||||
// Array operations
|
||||
public const byte ARRAY_BOUNDS_CHECK = 0xE0;
|
||||
@ -63,9 +72,16 @@ public static class Bytecode {
|
||||
{ OpCodes.ADD_ULINT, "ADD_ULINT" }, { OpCodes.SUB_ULINT, "SUB_ULINT" }, { OpCodes.MUL_ULINT, "MUL_ULINT" }, { OpCodes.DIV_ULINT, "DIV_ULINT" },
|
||||
{ OpCodes.ADD_REAL, "ADD_REAL" }, { OpCodes.SUB_REAL, "SUB_REAL" }, { OpCodes.MUL_REAL, "MUL_REAL" }, { OpCodes.DIV_REAL, "DIV_REAL" },
|
||||
{ OpCodes.ADD_LREAL, "ADD_LREAL" }, { OpCodes.SUB_LREAL, "SUB_LREAL" }, { OpCodes.MUL_LREAL, "MUL_LREAL" }, { OpCodes.DIV_LREAL, "DIV_LREAL" },
|
||||
{ OpCodes.LT_S, "LT_S" }, { OpCodes.GT_S, "GT_S" }, { OpCodes.LE_S, "LE_S" }, { OpCodes.GE_S, "GE_S" }, { OpCodes.EQ_S, "EQ_S" }, { OpCodes.NEQ_S, "NEQ_S" },
|
||||
{ OpCodes.LT_U, "LT_U" }, { OpCodes.GT_U, "GT_U" }, { OpCodes.LE_U, "LE_U" }, { OpCodes.GE_U, "GE_U" }, { OpCodes.EQ_U, "EQ_U" }, { OpCodes.NEQ_U, "NEQ_U" },
|
||||
{ OpCodes.LT_F, "LT_F" }, { OpCodes.GT_F, "GT_F" }, { OpCodes.LE_F, "LE_F" }, { OpCodes.GE_F, "GE_F" }, { OpCodes.EQ_F, "EQ_F" }, { OpCodes.NEQ_F, "NEQ_F" },
|
||||
{ OpCodes.LT_SINT, "LT_SINT" }, { OpCodes.GT_SINT, "GT_SINT" }, { OpCodes.LE_SINT, "LE_SINT" }, { OpCodes.GE_SINT, "GE_SINT" }, { OpCodes.EQ_SINT, "EQ_SINT" }, { OpCodes.NEQ_SINT, "NEQ_SINT" },
|
||||
{ OpCodes.LT_INT, "LT_INT" }, { OpCodes.GT_INT, "GT_INT" }, { OpCodes.LE_INT, "LE_INT" }, { OpCodes.GE_INT, "GE_INT" }, { OpCodes.EQ_INT, "EQ_INT" }, { OpCodes.NEQ_INT, "NEQ_INT" },
|
||||
{ OpCodes.LT_DINT, "LT_DINT" }, { OpCodes.GT_DINT, "GT_DINT" }, { OpCodes.LE_DINT, "LE_DINT" }, { OpCodes.GE_DINT, "GE_DINT" }, { OpCodes.EQ_DINT, "EQ_DINT" }, { OpCodes.NEQ_DINT, "NEQ_DINT" },
|
||||
{ OpCodes.LT_LINT, "LT_LINT" }, { OpCodes.GT_LINT, "GT_LINT" }, { OpCodes.LE_LINT, "LE_LINT" }, { OpCodes.GE_LINT, "GE_LINT" }, { OpCodes.EQ_LINT, "EQ_LINT" }, { OpCodes.NEQ_LINT, "NEQ_LINT" },
|
||||
{ OpCodes.LT_USINT, "LT_USINT" }, { OpCodes.GT_USINT, "GT_USINT" }, { OpCodes.LE_USINT, "LE_USINT" }, { OpCodes.GE_USINT, "GE_USINT" }, { OpCodes.EQ_USINT, "EQ_USINT" }, { OpCodes.NEQ_USINT, "NEQ_USINT" },
|
||||
{ OpCodes.LT_UINT, "LT_UINT" }, { OpCodes.GT_UINT, "GT_UINT" }, { OpCodes.LE_UINT, "LE_UINT" }, { OpCodes.GE_UINT, "GE_UINT" }, { OpCodes.EQ_UINT, "EQ_UINT" }, { OpCodes.NEQ_UINT, "NEQ_UINT" },
|
||||
{ OpCodes.LT_UDINT, "LT_UDINT" }, { OpCodes.GT_UDINT, "GT_UDINT" }, { OpCodes.LE_UDINT, "LE_UDINT" }, { OpCodes.GE_UDINT, "GE_UDINT" }, { OpCodes.EQ_UDINT, "EQ_UDINT" }, { OpCodes.NEQ_UDINT, "NEQ_UDINT" },
|
||||
{ OpCodes.LT_ULINT, "LT_ULINT" }, { OpCodes.GT_ULINT, "GT_ULINT" }, { OpCodes.LE_ULINT, "LE_ULINT" }, { OpCodes.GE_ULINT, "GE_ULINT" }, { OpCodes.EQ_ULINT, "EQ_ULINT" }, { OpCodes.NEQ_ULINT, "NEQ_ULINT" },
|
||||
{ OpCodes.LT_REAL, "LT_REAL" }, { OpCodes.GT_REAL, "GT_REAL" }, { OpCodes.LE_REAL, "LE_REAL" }, { OpCodes.GE_REAL, "GE_REAL" }, { OpCodes.EQ_REAL, "EQ_REAL" }, { OpCodes.NEQ_REAL, "NEQ_REAL" },
|
||||
{ OpCodes.LT_LREAL, "LT_LREAL" }, { OpCodes.GT_LREAL, "GT_LREAL" }, { OpCodes.LE_LREAL, "LE_LREAL" }, { OpCodes.GE_LREAL, "GE_LREAL" }, { OpCodes.EQ_LREAL, "EQ_LREAL" }, { OpCodes.NEQ_LREAL, "NEQ_LREAL" },
|
||||
{ OpCodes.JZ, "JZ" }, { OpCodes.JMP, "JMP" },
|
||||
{ OpCodes.ARRAY_BOUNDS_CHECK, "ARRAY_BOUNDS_CHECK" },
|
||||
{ OpCodes.HALT, "HALT" }
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("STCompiler.Common")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+74f256efb2d90ae0bc878111d497ee146327bb51")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5a002806a9ee3a7389c5a14069c534271a20a9ac")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("STCompiler.Common")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("STCompiler.Common")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@ -1 +1 @@
|
||||
4f685d6f74184ca56c8bdd109d64fc681695ed4155cb24ff44ab2c139f8eee14
|
||||
47a06821b3855b1302f973341d27a55ee26f60ac14ed88a286a0d4a4b2a812d1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user