RPA Toolkit
Removed RMV_ prefix from the opcode display names.
authorMartin Stoilov <martin@rpasearch.com>
Thu, 14 Jul 2011 04:47:47 +0000 (21:47 -0700)
committerMartin Stoilov <martin@rpasearch.com>
Thu, 14 Jul 2011 04:47:47 +0000 (21:47 -0700)
rgrep/unix/main.c
rgrep/win32/main.c
rvm/rvmcpu.c

index 218592b..c3604dc 100644 (file)
@@ -58,6 +58,7 @@ int usage(int argc, const char *argv[])
                fprintf(stderr, "\t-h, --help               Display this help.\n");
                fprintf(stderr, "\t    --debug-compile      Display debug compilation information.\n");
                fprintf(stderr, "\t    --dump-info          Display rules info.\n");
+               fprintf(stderr, "\t    --dump-code rule     Display compiled code for rule.\n");
                fprintf(stderr, "\t    --dump-alias         Display alias info.\n");
                fprintf(stderr, "\t    --dump-records       Display rules parsing records.\n");
                fprintf(stderr, "\t    --no-optimizations   Disable optimizations.\n");
index 65c8a50..7e4cc07 100644 (file)
@@ -52,6 +52,7 @@ int usage(int argc, const wchar_t *argv[])
                fwprintf(stderr, L"\t-h, --help               Display this help.\n");
                fwprintf(stderr, L"\t    --debug-compile      Display debug compilation information.\n");
                fwprintf(stderr, L"\t    --dump-info          Display rules info.\n");
+               fwprintf(stderr, L"\t    --dump-code rule     Display compiled code for rule.\n");
                fwprintf(stderr, L"\t    --dump-alias         Display alias info.\n");
                fwprintf(stderr, L"\t    --dump-records       Display rules parsing records.\n");
                fwprintf(stderr, L"\t    --no-optimizations   Disable optimizations.\n");
index df53173..388eb4d 100644 (file)
 #define RVM_DEFAULT_STACKSIZE (4 * 1024)
 
 static const char *stropcalls[] = {
-       "RVM_EXT",
-       "RVM_ABORT",
-       "RVM_PRN",
-       "RVM_ASR",
-       "RVM_SWI",
-       "RVM_SWIID",
-       "RVM_CALL",
-       "RVM_MOV",
-       "RVM_MOVS",
-       "RVM_SWP",
-       "RVM_INC",
-       "RVM_DEC",
-       "RVM_ADD",
-       "RVM_ADDS",
-       "RVM_ADC",
-       "RVM_AND",
-       "RVM_BIC",
-       "RVM_CLZ",
-       "RVM_CMN",
-       "RVM_XOR",
-       "RVM_SUB",
-       "RVM_SUBS",
-       "RVM_SBC",
-       "RVM_MUL",
-       "RVM_MLS",
-       "RVM_MULS",
-       "RVM_NOT",
-       "RVM_DIV",
-       "RVM_DVS",
-       "RVM_DIVS",
-       "RVM_MOD",
-       "RVM_MODS",
-       "RVM_BX",
-       "RVM_BXEQ",
-       "RVM_BXNEQ",
-       "RVM_BXLEQ",
-       "RVM_BXGEQ",
-       "RVM_BXLES",
-       "RVM_BXGRE",
-       "RVM_BXL",
-       "RVM_BL",
-       "RVM_B",
-       "RVM_STR",
-       "RVM_STRP",
-       "RVM_STRB",
-       "RVM_STRH",
-       "RVM_STRW",
-       "RVM_STRR",
-       "RVM_LDR",
-       "RVM_LDRP",
-       "RVM_LDRB",
-       "RVM_LDRH",
-       "RVM_LDRW",
-       "RVM_LDRR",
-       "RVM_CFLAG",
-       "RVM_CLR",
-       "RVM_CLRR",
-       "RVM_LSL",
-       "RVM_LSR",
-       "RVM_LSRS",
-       "RVM_STM",
-       "RVM_LDM",
-       "RVM_STS",
-       "RVM_LDS",
-       "RVM_ORR",
-       "RVM_PUSH",
-       "RVM_POP",
-       "RVM_CMP",
-       "RVM_NOP",
-       "RVM_BEQ",
-       "RVM_BNEQ",
-       "RVM_BLEQ",
-       "RVM_BGEQ",
-       "RVM_BLES",
-       "RVM_BGRE",
-       "RVM_RET",
-       "RVM_ROR",
-       "RVM_PUSHM",
-       "RVM_POPM",     
-       "RVM_TST",
-       "RVM_TEQ",
-       "RVM_ADDRS",
-
-       "RVM_CAST",             /* Cast: op1 = (op3)op2 */
-       "RVM_TYPE",             /* Type: op1 = typeof(op2) */
-       "RVM_SETTYPE",  /* Type: op1.type = op2 */
-       "RVM_EMOV",
-       "RVM_ENEG",
-       "RVM_EADD",
-       "RVM_ESUB",
-       "RVM_EMUL",
-       "RVM_EDIV",
-       "RVM_EMOD",
-       "RVM_ELSL",
-       "RVM_ELSR",
-       "RVM_ELSRU",
-       "RVM_EAND",
-       "RVM_EORR",
-       "RVM_EXOR",
-       "RVM_ENOT",
-       "RVM_ELAND",
-       "RVM_ELOR",
-       "RVM_ELNOT",
-       "RVM_EEQ",
-       "RVM_ENOTEQ",
-       "RVM_EGREAT",
-       "RVM_EGREATEQ",
-       "RVM_ELESS",
-       "RVM_ELESSEQ",
-       "RVM_ECMP",
-       "RVM_ECMN",
-       "RVM_ALLOCSTR",
-       "RVM_ALLOCARR",
-       "RVM_ADDRA",
-       "RVM_LDA",
-       "RVM_STA",
-       "RVM_MAPALLOC",
-       "RVM_MAPADDR",
-       "RVM_MAPLDR",
-       "RVM_MAPSTR",
-       "RVM_MAPLKUP",
-       "RVM_MAPADD",
-       "RVM_MAPLKUPADD",
+       "EXT",
+       "ABORT",
+       "PRN",
+       "ASR",
+       "SWI",
+       "SWIID",
+       "CALL",
+       "MOV",
+       "MOVS",
+       "SWP",
+       "INC",
+       "DEC",
+       "ADD",
+       "ADDS",
+       "ADC",
+       "AND",
+       "BIC",
+       "CLZ",
+       "CMN",
+       "XOR",
+       "SUB",
+       "SUBS",
+       "SBC",
+       "MUL",
+       "MLS",
+       "MULS",
+       "NOT",
+       "DIV",
+       "DVS",
+       "DIVS",
+       "MOD",
+       "MODS",
+       "BX",
+       "BXEQ",
+       "BXNEQ",
+       "BXLEQ",
+       "BXGEQ",
+       "BXLES",
+       "BXGRE",
+       "BXL",
+       "BL",
+       "B",
+       "STR",
+       "STRP",
+       "STRB",
+       "STRH",
+       "STRW",
+       "STRR",
+       "LDR",
+       "LDRP",
+       "LDRB",
+       "LDRH",
+       "LDRW",
+       "LDRR",
+       "CFLAG",
+       "CLR",
+       "CLRR",
+       "LSL",
+       "LSR",
+       "LSRS",
+       "STM",
+       "LDM",
+       "STS",
+       "LDS",
+       "ORR",
+       "PUSH",
+       "POP",
+       "CMP",
+       "NOP",
+       "BEQ",
+       "BNEQ",
+       "BLEQ",
+       "BGEQ",
+       "BLES",
+       "BGRE",
+       "RET",
+       "ROR",
+       "PUSHM",
+       "POPM",
+       "TST",
+       "TEQ",
+       "ADDRS",
+
+       "CAST",         /* Cast: op1 = (op3)op2 */
+       "TYPE",         /* Type: op1 = typeof(op2) */
+       "SETTYPE",      /* Type: op1.type = op2 */
+       "EMOV",
+       "ENEG",
+       "EADD",
+       "ESUB",
+       "EMUL",
+       "EDIV",
+       "EMOD",
+       "ELSL",
+       "ELSR",
+       "ELSRU",
+       "EAND",
+       "EORR",
+       "EXOR",
+       "ENOT",
+       "ELAND",
+       "ELOR",
+       "ELNOT",
+       "EEQ",
+       "ENOTEQ",
+       "EGREAT",
+       "EGREATEQ",
+       "ELESS",
+       "ELESSEQ",
+       "ECMP",
+       "ECMN",
+       "ALLOCSTR",
+       "ALLOCARR",
+       "ADDRA",
+       "LDA",
+       "STA",
+       "MAPALLOC",
+       "MAPADDR",
+       "MAPLDR",
+       "MAPSTR",
+       "MAPLKUP",
+       "MAPADD",
+       "MAPLKUPADD",
        "UNKNOWN",
        "UNKNOWN",
        "UNKNOWN",