1.1 --- a/sourcepawn/vm/jit/x86/opcode_helpers.cpp Sat Sep 23 23:37:40 2006 +0000
1.2 +++ b/sourcepawn/vm/jit/x86/opcode_helpers.cpp Sun Sep 24 06:17:10 2006 +0000
1.3 @@ -6,7 +6,7 @@
1.4
1.5 int OpAdvTable[OP_NUM_OPCODES];
1.6
1.7 -jitoffs_t Write_Execute_Function(JitWriter *jit, bool never_inline)
1.8 +jitoffs_t Write_Execute_Function(JitWriter *jit)
1.9 {
1.10 /**
1.11 * The variables we're passed in:
1.12 @@ -79,7 +79,7 @@
1.13 //mov edx, [eax+<offs>] - get alt
1.14 //mov eax, [eax+<offs>] - get pri
1.15 IA32_Mov_Reg_Rm_Disp8(jit, REG_ECX, REG_EBP, 12);
1.16 - IA32_Add_Reg_Rm_Disp8(jit, REG_ECX, REG_EAX, offsetof(sp_context_t, base));
1.17 + IA32_Add_Reg_Rm_Disp8(jit, REG_ECX, REG_EAX, offsetof(sp_context_t, codebase));
1.18 IA32_Mov_Reg_Rm_Disp8(jit, AMX_REG_ALT, REG_EAX, offsetof(sp_context_t, alt));
1.19 IA32_Mov_Reg_Rm_Disp8(jit, AMX_REG_PRI, REG_EAX, offsetof(sp_context_t, pri));
1.20
1.21 @@ -503,7 +503,6 @@
1.22 OpAdvTable[OP_LREF_ALT] = sizeof(cell_t);
1.23 OpAdvTable[OP_LREF_S_PRI] = sizeof(cell_t);
1.24 OpAdvTable[OP_LREF_S_ALT] = sizeof(cell_t);
1.25 - OpAdvTable[OP_LODB_I] = sizeof(cell_t);
1.26 OpAdvTable[OP_CONST_PRI] = sizeof(cell_t);
1.27 OpAdvTable[OP_CONST_ALT] = sizeof(cell_t);
1.28 OpAdvTable[OP_ADDR_PRI] = sizeof(cell_t);
1.29 @@ -516,19 +515,13 @@
1.30 OpAdvTable[OP_SREF_ALT] = sizeof(cell_t);
1.31 OpAdvTable[OP_SREF_S_PRI] = sizeof(cell_t);
1.32 OpAdvTable[OP_SREF_S_ALT] = sizeof(cell_t);
1.33 - OpAdvTable[OP_STRB_I] = sizeof(cell_t);
1.34 OpAdvTable[OP_LIDX_B] = sizeof(cell_t);
1.35 OpAdvTable[OP_IDXADDR_B] = sizeof(cell_t);
1.36 - OpAdvTable[OP_ALIGN_PRI] = sizeof(cell_t);
1.37 - OpAdvTable[OP_ALIGN_ALT] = sizeof(cell_t);
1.38 - OpAdvTable[OP_LCTRL] = sizeof(cell_t);
1.39 - OpAdvTable[OP_SCTRL] = sizeof(cell_t);
1.40 OpAdvTable[OP_PUSH_C] = sizeof(cell_t);
1.41 OpAdvTable[OP_PUSH] = sizeof(cell_t);
1.42 OpAdvTable[OP_PUSH_S] = sizeof(cell_t);
1.43 OpAdvTable[OP_STACK] = sizeof(cell_t);
1.44 OpAdvTable[OP_HEAP] = sizeof(cell_t);
1.45 - OpAdvTable[OP_JREL] = sizeof(cell_t);
1.46 OpAdvTable[OP_SHL_C_PRI] = sizeof(cell_t);
1.47 OpAdvTable[OP_SHL_C_ALT] = sizeof(cell_t);
1.48 OpAdvTable[OP_SHR_C_PRI] = sizeof(cell_t);
1.49 @@ -544,7 +537,6 @@
1.50 OpAdvTable[OP_DEC] = sizeof(cell_t);
1.51 OpAdvTable[OP_DEC_S] = sizeof(cell_t);
1.52 OpAdvTable[OP_MOVS] = sizeof(cell_t);
1.53 - OpAdvTable[OP_CMPS] = sizeof(cell_t);
1.54 OpAdvTable[OP_FILL] = sizeof(cell_t);
1.55 OpAdvTable[OP_HALT] = sizeof(cell_t);
1.56 OpAdvTable[OP_BOUNDS] = sizeof(cell_t);
1.57 @@ -574,9 +566,6 @@
1.58 OpAdvTable[OP_SMUL] = 0;
1.59 OpAdvTable[OP_SDIV] = 0;
1.60 OpAdvTable[OP_SDIV_ALT] = 0;
1.61 - OpAdvTable[OP_UMUL] = 0;
1.62 - OpAdvTable[OP_UDIV] = 0;
1.63 - OpAdvTable[OP_UDIV_ALT] = 0;
1.64 OpAdvTable[OP_ADD] = 0;
1.65 OpAdvTable[OP_SUB] = 0;
1.66 OpAdvTable[OP_SUB_ALT] = 0;
1.67 @@ -592,10 +581,6 @@
1.68 OpAdvTable[OP_SIGN_ALT] = 0;
1.69 OpAdvTable[OP_EQ] = 0;
1.70 OpAdvTable[OP_NEQ] = 0;
1.71 - OpAdvTable[OP_LESS] = 0;
1.72 - OpAdvTable[OP_LEQ] = 0;
1.73 - OpAdvTable[OP_GRTR] = 0;
1.74 - OpAdvTable[OP_GEQ] = 0;
1.75 OpAdvTable[OP_SLESS] = 0;
1.76 OpAdvTable[OP_SLEQ] = 0;
1.77 OpAdvTable[OP_SGRTR] = 0;
1.78 @@ -622,10 +607,6 @@
1.79 OpAdvTable[OP_JNZ] = -2;
1.80 OpAdvTable[OP_JEQ] = -2;
1.81 OpAdvTable[OP_JNEQ] = -2;
1.82 - OpAdvTable[OP_JLESS] = -2;
1.83 - OpAdvTable[OP_JLEQ] = -2;
1.84 - OpAdvTable[OP_JGRTR] = -2;
1.85 - OpAdvTable[OP_JGEQ] = -2;
1.86 OpAdvTable[OP_JSLESS] = -2;
1.87 OpAdvTable[OP_JSLEQ] = -2;
1.88 OpAdvTable[OP_JSGRTR] = -2;
1.89 @@ -633,6 +614,7 @@
1.90 OpAdvTable[OP_SWITCH] = -2;
1.91
1.92 /* opcodes that are totally invalid */
1.93 + /* :TODO: make an alternate table if USE_UNGEN_OPCODES is on? */
1.94 OpAdvTable[OP_FILE] = -3;
1.95 OpAdvTable[OP_SYMBOL] = -3;
1.96 OpAdvTable[OP_LINE] = -3;
1.97 @@ -641,4 +623,24 @@
1.98 OpAdvTable[OP_SYSREQ_D] = -3;
1.99 OpAdvTable[OP_SYSREQ_ND] = -3;
1.100 OpAdvTable[OP_PUSH_R] = -3;
1.101 + OpAdvTable[OP_LODB_I] = -3;
1.102 + OpAdvTable[OP_STRB_I] = -3;
1.103 + OpAdvTable[OP_LCTRL] = -3;
1.104 + OpAdvTable[OP_SCTRL] = -3;
1.105 + OpAdvTable[OP_ALIGN_PRI] = -3;
1.106 + OpAdvTable[OP_ALIGN_ALT] = -3;
1.107 + OpAdvTable[OP_JREL] = -3;
1.108 + OpAdvTable[OP_CMPS] = -3;
1.109 + OpAdvTable[OP_UMUL] = -3;
1.110 + OpAdvTable[OP_UDIV] = -3;
1.111 + OpAdvTable[OP_UDIV_ALT] = -3;
1.112 + OpAdvTable[OP_LESS] = -3;
1.113 + OpAdvTable[OP_LEQ] = -3;
1.114 + OpAdvTable[OP_GRTR] = -3;
1.115 + OpAdvTable[OP_GEQ] = -3;
1.116 + OpAdvTable[OP_JLESS] = -3;
1.117 + OpAdvTable[OP_JLEQ] = -3;
1.118 + OpAdvTable[OP_JGRTR] = -3;
1.119 + OpAdvTable[OP_JGEQ] = -3;
1.120 +
1.121 }