Also fix instruction coloring and naming in disassembler.
- For some reason, all LOAD_ instructions are called FIELD_ now. Weren't
they called INDIRECT_ once? Well, anyway, not touching that, just
making it consistent with itself.
- Match new instructions in color to existing ones doing the same.
#include "quakedef.h"
#include "progsvm.h"
+// Should only contain the opcodes DP actually implements, so unknown opcodes
+// are more readably marked as such in disassembly. Thus, best keep this in sync
+// with the list in prvm_execprogram.h.
static const char *prvm_opnames[] =
{
"^5DONE",
-
"MUL_F",
"MUL_V",
"MUL_FV",
"MUL_VF",
-
"DIV",
-
"ADD_F",
"ADD_V",
-
"SUB_F",
"SUB_V",
"^1STOREP_FNC",
"^5RETURN",
-
"^2NOT_F",
"^2NOT_V",
"^2NOT_S",
"^2NOT_ENT",
"^2NOT_FNC",
-
"^5IF",
"^5IFNOT",
-
"^3CALL0",
"^3CALL1",
"^3CALL2",
"^3CALL6",
"^3CALL7",
"^3CALL8",
-
"^1STATE",
-
"^5GOTO",
-
"^2AND",
"^2OR",
"BITAND",
"BITOR",
-
-
-
NULL,
NULL,
NULL,
NULL,
NULL,
-"LOAD_I",
-"STOREP_I",
+"^6FIELD_I",
+"^1STOREP_I",
NULL,
NULL,
"DIV_VF",
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
NULL,
NULL,
NULL,
-"STORE_P",
+"GLOBALADDRESS",
+"ADD_PIW",
+"LOADA_F",
+"LOADA_V",
+"LOADA_S",
+"LOADA_ENT",
+"LOADA_FLD",
+"LOADA_FNC",
+"LOADA_I",
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
-NULL,
+"STORE_P",
+"^6FIELD_P",
+
+"LOADP_F",
+"LOADP_V",
+"LOADP_S",
+"LOADP_ENT",
+"LOADP_FLD",
+"LOADP_FNC",
+"LOADP_I",
"LE_I",
"GE_I",
NULL,
NULL,
NULL,
+
&&handle_OP_GLOBALADDRESS,
&&handle_OP_ADD_PIW,
&&handle_OP_LOADA_F,