emu_cpu_functions.h

Go to the documentation of this file.
00001 /********************************************************************************
00002  *                               libemu
00003  *
00004  *                    - x86 shellcode emulation -
00005  *
00006  *
00007  * Copyright (C) 2007  Paul Baecher & Markus Koetter
00008  * 
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License
00011  * as published by the Free Software Foundation; either version 2
00012  * of the License, or (at your option) any later version.
00013  * 
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022  * 
00023  * 
00024  *             contact nepenthesdev@users.sourceforge.net  
00025  *
00026  *******************************************************************************/
00027 
00028 #ifndef HAVE_EMU_CPU_FUNCTIONS_H
00029 #define HAVE_EMU_CPU_FUNCTIONS_H
00030 
00031 
00032 /* misc */
00033 int32_t prefix_fn(struct emu_cpu *c, struct emu_cpu_instruction *i);
00034 
00035 /* add */
00036 int32_t instr_add_00(struct emu_cpu *c, struct emu_cpu_instruction *i);
00037 int32_t instr_add_01(struct emu_cpu *c, struct emu_cpu_instruction *i);
00038 int32_t instr_add_02(struct emu_cpu *c, struct emu_cpu_instruction *i);
00039 int32_t instr_add_03(struct emu_cpu *c, struct emu_cpu_instruction *i);
00040 int32_t instr_add_04(struct emu_cpu *c, struct emu_cpu_instruction *i);
00041 int32_t instr_add_05(struct emu_cpu *c, struct emu_cpu_instruction *i);
00042 
00043 /* or */
00044 int32_t instr_or_08(struct emu_cpu *c, struct emu_cpu_instruction *i);
00045 int32_t instr_or_09(struct emu_cpu *c, struct emu_cpu_instruction *i);
00046 int32_t instr_or_0a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00047 int32_t instr_or_0b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00048 int32_t instr_or_0c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00049 int32_t instr_or_0d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00050 
00051 
00052 /* adc */
00053 int32_t instr_adc_10(struct emu_cpu *c, struct emu_cpu_instruction *i);
00054 int32_t instr_adc_11(struct emu_cpu *c, struct emu_cpu_instruction *i);
00055 int32_t instr_adc_12(struct emu_cpu *c, struct emu_cpu_instruction *i);
00056 int32_t instr_adc_13(struct emu_cpu *c, struct emu_cpu_instruction *i);
00057 int32_t instr_adc_14(struct emu_cpu *c, struct emu_cpu_instruction *i);
00058 int32_t instr_adc_15(struct emu_cpu *c, struct emu_cpu_instruction *i);
00059 
00060 /* sbb */
00061 int32_t instr_sbb_18(struct emu_cpu *c, struct emu_cpu_instruction *i);
00062 int32_t instr_sbb_19(struct emu_cpu *c, struct emu_cpu_instruction *i);
00063 int32_t instr_sbb_1a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00064 int32_t instr_sbb_1b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00065 int32_t instr_sbb_1c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00066 int32_t instr_sbb_1d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00067 
00068 
00069 /* and */
00070 int32_t instr_and_20(struct emu_cpu *c, struct emu_cpu_instruction *i);
00071 int32_t instr_and_21(struct emu_cpu *c, struct emu_cpu_instruction *i);
00072 int32_t instr_and_22(struct emu_cpu *c, struct emu_cpu_instruction *i);
00073 int32_t instr_and_23(struct emu_cpu *c, struct emu_cpu_instruction *i);
00074 int32_t instr_and_24(struct emu_cpu *c, struct emu_cpu_instruction *i);
00075 int32_t instr_and_25(struct emu_cpu *c, struct emu_cpu_instruction *i);
00076 
00077 /* sub */
00078 int32_t instr_sub_28(struct emu_cpu *c, struct emu_cpu_instruction *i);
00079 int32_t instr_sub_29(struct emu_cpu *c, struct emu_cpu_instruction *i);
00080 int32_t instr_sub_2a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00081 int32_t instr_sub_2b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00082 int32_t instr_sub_2c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00083 int32_t instr_sub_2d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00084 
00085 
00086 /* xor */
00087 int32_t instr_xor_30(struct emu_cpu *c, struct emu_cpu_instruction *i);
00088 int32_t instr_xor_31(struct emu_cpu *c, struct emu_cpu_instruction *i);
00089 int32_t instr_xor_32(struct emu_cpu *c, struct emu_cpu_instruction *i);
00090 int32_t instr_xor_33(struct emu_cpu *c, struct emu_cpu_instruction *i);
00091 int32_t instr_xor_34(struct emu_cpu *c, struct emu_cpu_instruction *i);
00092 int32_t instr_xor_35(struct emu_cpu *c, struct emu_cpu_instruction *i);
00093 
00094 /* cmp */
00095 int32_t instr_cmp_38(struct emu_cpu *c, struct emu_cpu_instruction *i);
00096 int32_t instr_cmp_39(struct emu_cpu *c, struct emu_cpu_instruction *i);
00097 int32_t instr_cmp_3a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00098 int32_t instr_cmp_3b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00099 int32_t instr_cmp_3c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00100 int32_t instr_cmp_3d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00101 
00102 /* group 1 */
00103 int32_t instr_group_1_80(struct emu_cpu *c, struct emu_cpu_instruction *i);
00104 int32_t instr_group_1_80_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
00105 int32_t instr_group_1_80_or (struct emu_cpu *c, struct emu_cpu_instruction *i);
00106 int32_t instr_group_1_80_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00107 int32_t instr_group_1_80_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
00108 int32_t instr_group_1_80_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
00109 int32_t instr_group_1_80_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
00110 int32_t instr_group_1_80_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
00111 int32_t instr_group_1_80_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
00112 
00113 int32_t instr_group_1_81(struct emu_cpu *c, struct emu_cpu_instruction *i);
00114 int32_t instr_group_1_81_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
00115 int32_t instr_group_1_81_or(struct emu_cpu *c, struct emu_cpu_instruction *i);
00116 int32_t instr_group_1_81_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00117 int32_t instr_group_1_81_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
00118 int32_t instr_group_1_81_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
00119 int32_t instr_group_1_81_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
00120 int32_t instr_group_1_81_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
00121 int32_t instr_group_1_81_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
00122 
00123 int32_t instr_group_1_83(struct emu_cpu *c, struct emu_cpu_instruction *i);
00124 int32_t instr_group_1_83_add(struct emu_cpu *c, struct emu_cpu_instruction *i);
00125 int32_t instr_group_1_83_or(struct emu_cpu *c, struct emu_cpu_instruction *i);
00126 int32_t instr_group_1_83_adc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00127 int32_t instr_group_1_83_sbb(struct emu_cpu *c, struct emu_cpu_instruction *i);
00128 int32_t instr_group_1_83_and(struct emu_cpu *c, struct emu_cpu_instruction *i);
00129 int32_t instr_group_1_83_sub(struct emu_cpu *c, struct emu_cpu_instruction *i);
00130 int32_t instr_group_1_83_xor(struct emu_cpu *c, struct emu_cpu_instruction *i);
00131 int32_t instr_group_1_83_cmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
00132 
00133 /* group 3 */
00134 int32_t instr_group_3_f6(struct emu_cpu *c, struct emu_cpu_instruction *i);
00135 int32_t instr_group_3_f6_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
00136 int32_t instr_group_3_f6_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
00137 int32_t instr_group_3_f6_not(struct emu_cpu *c, struct emu_cpu_instruction *i);
00138 int32_t instr_group_3_f6_neg(struct emu_cpu *c, struct emu_cpu_instruction *i);
00139 int32_t instr_group_3_f6_mul(struct emu_cpu *c, struct emu_cpu_instruction *i);
00140 int32_t instr_group_3_f6_imul(struct emu_cpu *c, struct emu_cpu_instruction *i);
00141 int32_t instr_group_3_f6_div(struct emu_cpu *c, struct emu_cpu_instruction *i);
00142 int32_t instr_group_3_f6_idiv(struct emu_cpu *c, struct emu_cpu_instruction *i);
00143 
00144 int32_t instr_group_3_f7(struct emu_cpu *c, struct emu_cpu_instruction *i);
00145 int32_t instr_group_3_f7_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
00146 int32_t instr_group_3_f7_test(struct emu_cpu *c, struct emu_cpu_instruction *i);
00147 int32_t instr_group_3_f7_not(struct emu_cpu *c, struct emu_cpu_instruction *i);
00148 int32_t instr_group_3_f7_neg(struct emu_cpu *c, struct emu_cpu_instruction *i);
00149 int32_t instr_group_3_f7_mul(struct emu_cpu *c, struct emu_cpu_instruction *i);
00150 int32_t instr_group_3_f7_imul(struct emu_cpu *c, struct emu_cpu_instruction *i);
00151 int32_t instr_group_3_f7_div(struct emu_cpu *c, struct emu_cpu_instruction *i);
00152 int32_t instr_group_3_f7_idiv(struct emu_cpu *c, struct emu_cpu_instruction *i);
00153 
00154 /* group 4 */
00155 int32_t instr_group_4_fe(struct emu_cpu *c, struct emu_cpu_instruction *i);
00156 int32_t instr_group_4_fe_inc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00157 int32_t instr_group_4_fe_dec(struct emu_cpu *c, struct emu_cpu_instruction *i);
00158 
00159 
00160 
00161 
00162 /* group 5 */
00163 int32_t instr_group_5_ff(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00164 int32_t instr_group_5_ff_inc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00165 int32_t instr_group_5_ff_dec(struct emu_cpu *c, struct emu_cpu_instruction *i);
00166 int32_t instr_group_5_ff_call(struct emu_cpu *c, struct emu_cpu_instruction *i);
00167 int32_t instr_group_5_ff_jmp(struct emu_cpu *c, struct emu_cpu_instruction *i);
00168 int32_t instr_group_5_ff_push(struct emu_cpu *c, struct emu_cpu_instruction *i);
00169 
00170 /* group 10 */
00171 int32_t instr_group_10_8f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00172 int32_t instr_group_10_8f_pop(struct emu_cpu *c, struct emu_cpu_instruction *i);
00173 
00174 /* inc */
00175 int32_t instr_inc_4x(struct emu_cpu *c, struct emu_cpu_instruction *i);
00176 
00177 /* dec */
00178 int32_t instr_dec_4x(struct emu_cpu *c, struct emu_cpu_instruction *i);
00179 
00180 /* jcc */
00181 int32_t instr_jcc_70(struct emu_cpu *c, struct emu_cpu_instruction *i);
00182 int32_t instr_jcc_71(struct emu_cpu *c, struct emu_cpu_instruction *i);
00183 int32_t instr_jcc_72(struct emu_cpu *c, struct emu_cpu_instruction *i);
00184 int32_t instr_jcc_73(struct emu_cpu *c, struct emu_cpu_instruction *i);
00185 int32_t instr_jcc_74(struct emu_cpu *c, struct emu_cpu_instruction *i);
00186 int32_t instr_jcc_75(struct emu_cpu *c, struct emu_cpu_instruction *i);
00187 int32_t instr_jcc_76(struct emu_cpu *c, struct emu_cpu_instruction *i);
00188 int32_t instr_jcc_77(struct emu_cpu *c, struct emu_cpu_instruction *i);
00189 int32_t instr_jcc_78(struct emu_cpu *c, struct emu_cpu_instruction *i);
00190 int32_t instr_jcc_79(struct emu_cpu *c, struct emu_cpu_instruction *i);
00191 int32_t instr_jcc_7a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00192 int32_t instr_jcc_7b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00193 int32_t instr_jcc_7c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00194 int32_t instr_jcc_7d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00195 int32_t instr_jcc_7e(struct emu_cpu *c, struct emu_cpu_instruction *i);
00196 int32_t instr_jcc_7f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00197 int32_t instr_jcc_e3(struct emu_cpu *c, struct emu_cpu_instruction *i);
00198 int32_t instr_jcc_0f80(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00199 int32_t instr_jcc_0f81(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00200 int32_t instr_jcc_0f82(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00201 int32_t instr_jcc_0f83(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00202 int32_t instr_jcc_0f84(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00203 int32_t instr_jcc_0f85(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00204 int32_t instr_jcc_0f86(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00205 int32_t instr_jcc_0f87(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00206 int32_t instr_jcc_0f88(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00207 int32_t instr_jcc_0f89(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00208 int32_t instr_jcc_0f8a(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00209 int32_t instr_jcc_0f8b(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00210 int32_t instr_jcc_0f8c(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00211 int32_t instr_jcc_0f8d(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00212 int32_t instr_jcc_0f8e(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00213 int32_t instr_jcc_0f8f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00214 
00215 int32_t instr_setcc_0f94(struct emu_cpu *c, struct emu_cpu_instruction *i);
00216 int32_t instr_setcc_0f95(struct emu_cpu *c, struct emu_cpu_instruction *i);
00217 
00218 /* jump */
00219 int32_t instr_jmp_e9(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00220 /*int32_t instr_jmp_ea(struct emu_cpu *c, struct instruction *i);*/ 
00221 int32_t instr_jmp_eb(struct emu_cpu *c, struct emu_cpu_instruction *i);
00222 
00223 /* mov */
00224 int32_t instr_mov_88(struct emu_cpu *c, struct emu_cpu_instruction *i);
00225 int32_t instr_mov_89(struct emu_cpu *c, struct emu_cpu_instruction *i);
00226 int32_t instr_mov_8a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00227 int32_t instr_mov_8b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00228 int32_t instr_mov_8c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00229 /*int32_t instr_mov_8e(struct emu_cpu *c, struct instruction *i);*/
00230 int32_t instr_mov_a0(struct emu_cpu *c, struct emu_cpu_instruction *i);
00231 int32_t instr_mov_a1(struct emu_cpu *c, struct emu_cpu_instruction *i);
00232 int32_t instr_mov_a2(struct emu_cpu *c, struct emu_cpu_instruction *i);
00233 int32_t instr_mov_a3(struct emu_cpu *c, struct emu_cpu_instruction *i);
00234 int32_t instr_movsb(struct emu_cpu *c, struct emu_cpu_instruction *i);
00235 int32_t instr_mov_bx_1(struct emu_cpu *c, struct emu_cpu_instruction *i);
00236 int32_t instr_mov_bx_2(struct emu_cpu *c, struct emu_cpu_instruction *i);
00237 int32_t instr_mov_c6(struct emu_cpu *c, struct emu_cpu_instruction *i);
00238 int32_t instr_mov_c7(struct emu_cpu *c, struct emu_cpu_instruction *i);
00239 
00240 int32_t instr_leave(struct emu_cpu *c, struct emu_cpu_instruction *i);
00241                                                                                                                           
00242 /* pop */
00243 /*int32_t instr_pop_07(struct emu_cpu *c, struct instruction *i);
00244 int32_t instr_pop_17(struct emu_cpu *c, struct instruction *i);
00245 int32_t instr_pop_1f(struct emu_cpu *c, struct instruction *i);*/
00246 int32_t instr_pop_5x(struct emu_cpu *c, struct emu_cpu_instruction *i);
00247 int32_t instr_popad_61(struct emu_cpu *c, struct emu_cpu_instruction *i);
00248 /*int32_t instr_pop_0fa1(struct emu_cpu *c, struct instruction *i);
00249 int32_t instr_pop_0fa9(struct emu_cpu *c, struct instruction *i);*/
00250                                                                                                                                  
00251 /* push */                                                       
00252 /*int32_t instr_push_06(struct emu_cpu *c, struct instruction *i);  
00253 int32_t instr_push_0e(struct emu_cpu *c, struct instruction *i);  
00254 int32_t instr_push_16(struct emu_cpu *c, struct instruction *i);
00255 int32_t instr_push_1e(struct emu_cpu *c, struct instruction *i);*/
00256 int32_t instr_push_5x(struct emu_cpu *c, struct emu_cpu_instruction *i);
00257 int32_t instr_pushad_60(struct emu_cpu *c, struct emu_cpu_instruction *i);
00258 int32_t instr_push_68(struct emu_cpu *c, struct emu_cpu_instruction *i);
00259 int32_t instr_push_6a(struct emu_cpu *c, struct emu_cpu_instruction *i);
00260 /*int32_t instr_push_0fa0(struct emu_cpu *c, struct instruction *i);
00261 int32_t instr_push_0f08(struct emu_cpu *c, struct instruction *i);*/
00262 
00263 /* call */
00264 /*int32_t instr_call_9a(struct emu_cpu *c, struct instruction *i);*/
00265 int32_t instr_call_e8(struct emu_cpu *c, struct emu_cpu_instruction *i);
00266 
00267 
00268 /* loop/loopcc*/
00269 int32_t instr_loopcc_e0(struct emu_cpu *c, struct emu_cpu_instruction *i);
00270 int32_t instr_loopcc_e1(struct emu_cpu *c, struct emu_cpu_instruction *i);
00271 int32_t instr_loop_e2(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00272 
00273 /* ret */
00274 int32_t instr_ret_c2(struct emu_cpu *c, struct emu_cpu_instruction *i);
00275 int32_t instr_ret_c3(struct emu_cpu *c, struct emu_cpu_instruction *i);
00276 
00277 /* stos/stoscc*/
00278 int32_t instr_stos_aa(struct emu_cpu *c, struct emu_cpu_instruction *i);
00279 int32_t instr_stos_ab(struct emu_cpu *c, struct emu_cpu_instruction *i);
00280 
00281 /* lods/lodscc*/
00282 int32_t instr_lods_ac(struct emu_cpu *c, struct emu_cpu_instruction *i);
00283 int32_t instr_lods_ad(struct emu_cpu *c, struct emu_cpu_instruction *i);
00284 
00285 /* aaa */
00286 int32_t instr_aaa_37(struct emu_cpu *c, struct emu_cpu_instruction *i);
00287 
00288 
00289 /* imul */
00290 /*int32_t instr_imul_69(struct emu_cpu *c, struct instruction *i);*/
00291 int32_t instr_imul_6b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00292 /*int32_t instr_imul_0f_af(struct emu_cpu *c, struct instruction *i);*/
00293 
00294 /* misc */
00295 int32_t instr_daa_27(struct emu_cpu *c, struct emu_cpu_instruction *i);
00296 int32_t instr_das_2f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00297 int32_t instr_aas_3f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00298 int32_t instr_lea_8d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00299 int32_t instr_cbw_98(struct emu_cpu *c, struct emu_cpu_instruction *i);
00300 int32_t instr_cwd_99(struct emu_cpu *c, struct emu_cpu_instruction *i);
00301 int32_t instr_wait_9b(struct emu_cpu *c, struct emu_cpu_instruction *i);
00302 int32_t instr_pushf_9c(struct emu_cpu *c, struct emu_cpu_instruction *i);
00303 int32_t instr_popf_9d(struct emu_cpu *c, struct emu_cpu_instruction *i);
00304 int32_t instr_sahf_9e(struct emu_cpu *c, struct emu_cpu_instruction *i);
00305 int32_t instr_lahf_9f(struct emu_cpu *c, struct emu_cpu_instruction *i);
00306 int32_t instr_cmc_f5(struct emu_cpu *c, struct emu_cpu_instruction *i);
00307 int32_t instr_clc_f8(struct emu_cpu *c, struct emu_cpu_instruction *i);
00308 int32_t instr_stc_f9(struct emu_cpu *c, struct emu_cpu_instruction *i);
00309 int32_t instr_cld_fc(struct emu_cpu *c, struct emu_cpu_instruction *i);
00310 int32_t instr_std_fd(struct emu_cpu *c, struct emu_cpu_instruction *i);
00311 int32_t instr_sldt_0f00(struct emu_cpu *c, struct emu_cpu_instruction *i);
00312 
00313 /* group 2*/
00314 int32_t instr_group_2_c0(struct emu_cpu *c, struct emu_cpu_instruction *i);
00315 int32_t instr_group_2_c0_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00316 int32_t instr_group_2_c0_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00317 int32_t instr_group_2_c0_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00318 int32_t instr_group_2_c0_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00319 int32_t instr_group_2_c0_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00320 int32_t instr_group_2_c0_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00321 int32_t instr_group_2_c0_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00322 
00323 
00324 int32_t instr_group_2_c1(struct emu_cpu *c, struct emu_cpu_instruction *i);
00325 int32_t instr_group_2_c1_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00326 int32_t instr_group_2_c1_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00327 int32_t instr_group_2_c1_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00328 int32_t instr_group_2_c1_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00329 int32_t instr_group_2_c1_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00330 int32_t instr_group_2_c1_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00331 int32_t instr_group_2_c1_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00332 
00333 
00334 int32_t instr_group_2_d0(struct emu_cpu *c, struct emu_cpu_instruction *i);
00335 int32_t instr_group_2_d0_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00336 int32_t instr_group_2_d0_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00337 int32_t instr_group_2_d0_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00338 int32_t instr_group_2_d0_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00339 int32_t instr_group_2_d0_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00340 int32_t instr_group_2_d0_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00341 int32_t instr_group_2_d0_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00342 
00343 
00344 int32_t instr_group_2_d1(struct emu_cpu *c, struct emu_cpu_instruction *i);
00345 int32_t instr_group_2_d1_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00346 int32_t instr_group_2_d1_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00347 int32_t instr_group_2_d1_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00348 int32_t instr_group_2_d1_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00349 int32_t instr_group_2_d1_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00350 int32_t instr_group_2_d1_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00351 int32_t instr_group_2_d1_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00352 
00353 
00354 int32_t instr_group_2_d2(struct emu_cpu *c, struct emu_cpu_instruction *i);
00355 int32_t instr_group_2_d2_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00356 int32_t instr_group_2_d2_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00357 int32_t instr_group_2_d2_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00358 int32_t instr_group_2_d2_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00359 int32_t instr_group_2_d2_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00360 int32_t instr_group_2_d2_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00361 int32_t instr_group_2_d2_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00362 
00363 
00364 int32_t instr_group_2_d3(struct emu_cpu *c, struct emu_cpu_instruction *i);
00365 int32_t instr_group_2_d3_ror(struct emu_cpu *c, struct emu_cpu_instruction *i);
00366 int32_t instr_group_2_d3_rol(struct emu_cpu *c, struct emu_cpu_instruction *i);
00367 int32_t instr_group_2_d3_rcr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00368 int32_t instr_group_2_d3_rcl(struct emu_cpu *c, struct emu_cpu_instruction *i);
00369 int32_t instr_group_2_d3_sal(struct emu_cpu *c, struct emu_cpu_instruction *i);
00370 int32_t instr_group_2_d3_sar(struct emu_cpu *c, struct emu_cpu_instruction *i);
00371 int32_t instr_group_2_d3_shr(struct emu_cpu *c, struct emu_cpu_instruction *i);
00372 
00373 
00374 /* repcc */
00375 /*int32_t instr_repcc_f2a6(struct emu_cpu *c, struct instruction *i);
00376 int32_t instr_repcc_f2a7(struct emu_cpu *c, struct instruction *i);
00377 int32_t instr_repcc_f2ae(struct emu_cpu *c, struct instruction *i);
00378 int32_t instr_repcc_f2af(struct emu_cpu *c, struct instruction *i);
00379 int32_t instr_repcc_f36c(struct emu_cpu *c, struct instruction *i);
00380 int32_t instr_repcc_f36d(struct emu_cpu *c, struct instruction *i);
00381 int32_t instr_repcc_f36e(struct emu_cpu *c, struct instruction *i);
00382 int32_t instr_repcc_f36f(struct emu_cpu *c, struct instruction *i);
00383 int32_t instr_repcc_f3a4(struct emu_cpu *c, struct instruction *i);
00384 int32_t instr_repcc_f3a5(struct emu_cpu *c, struct instruction *i);
00385 int32_t instr_repcc_f3aa(struct emu_cpu *c, struct instruction *i);
00386 int32_t instr_repcc_f3ab(struct emu_cpu *c, struct instruction *i);
00387 int32_t instr_repcc_f3ac(struct emu_cpu *c, struct instruction *i);
00388 int32_t instr_repcc_f3ad(struct emu_cpu *c, struct instruction *i);
00389 int32_t instr_repcc_f3a6(struct emu_cpu *c, struct instruction *i);
00390 int32_t instr_repcc_f3a7(struct emu_cpu *c, struct instruction *i);
00391 int32_t instr_repcc_f3ae(struct emu_cpu *c, struct instruction *i);
00392 int32_t instr_repcc_f3af(struct emu_cpu *c, struct instruction *i); */
00393 
00394 /* test */
00395 int32_t instr_test_84(struct emu_cpu *c, struct emu_cpu_instruction *i);
00396 int32_t instr_test_85(struct emu_cpu *c, struct emu_cpu_instruction *i);
00397 int32_t instr_test_a8(struct emu_cpu *c, struct emu_cpu_instruction *i);
00398 int32_t instr_test_a9(struct emu_cpu *c, struct emu_cpu_instruction *i);
00399 
00400 /* scas */
00401 int32_t instr_scas_ae(struct emu_cpu *c, struct emu_cpu_instruction *i);
00402 int32_t instr_scas_af(struct emu_cpu *c, struct emu_cpu_instruction *i);
00403 
00404 /* cmps */
00405 int32_t instr_cmps_a6(struct emu_cpu *c, struct emu_cpu_instruction *i);
00406 int32_t instr_cmps_a7(struct emu_cpu *c, struct emu_cpu_instruction *i); 
00407 
00408 /* xchg */
00409 int32_t instr_xchg_86(struct emu_cpu *c, struct emu_cpu_instruction *i);
00410 int32_t instr_xchg_87(struct emu_cpu *c, struct emu_cpu_instruction *i);
00411 int32_t instr_xchg_9x(struct emu_cpu *c, struct emu_cpu_instruction *i);
00412 
00413 /* movsx */
00414 int32_t instr_movsx_0fbe(struct emu_cpu *c, struct emu_cpu_instruction *i);
00415 int32_t instr_movsx_0fbf(struct emu_cpu *c, struct emu_cpu_instruction *i);
00416 
00417 /* movzx */
00418 int32_t instr_movzx_0fb6(struct emu_cpu *c, struct emu_cpu_instruction *i);
00419 int32_t instr_movzx_0fb7(struct emu_cpu *c, struct emu_cpu_instruction *i);
00420 
00421 /* fpu esc */
00422 int32_t instr_esc_fpu_dx(struct emu_cpu *c, struct emu_cpu_instruction *i);
00423 
00424 /* int */
00425 int32_t instr_int_cd(struct emu_cpu *c, struct emu_cpu_instruction *i);
00426 
00427 #endif /*HAVE_EMU_CPU_FUNCTIONS_H*/                           
00428                                                                                                                           

Generated on Sun Jan 9 16:47:44 2011 for libemu by  doxygen 1.6.1