diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/xfree86/x86emu/fpu.c | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/xfree86/x86emu/fpu.c')
-rw-r--r-- | xorg-server/hw/xfree86/x86emu/fpu.c | 449 |
1 files changed, 230 insertions, 219 deletions
diff --git a/xorg-server/hw/xfree86/x86emu/fpu.c b/xorg-server/hw/xfree86/x86emu/fpu.c index fbc602da5..0dab05ce3 100644 --- a/xorg-server/hw/xfree86/x86emu/fpu.c +++ b/xorg-server/hw/xfree86/x86emu/fpu.c @@ -42,7 +42,8 @@ /*----------------------------- Implementation ----------------------------*/ /* opcode=0xd8 */ -void x86emuOp_esc_coprocess_d8(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_d8(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("ESC D8\n"); @@ -89,10 +90,11 @@ static const char *x86emu_fpu_op_d9_tab1[] = { "FRNDINT", "FSCALE", "ESC_D9", "ESC_D9", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xd9 */ -void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -103,56 +105,58 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1)) #ifdef DEBUG if (mod != 3) { DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl); - } else { + } + else { DECODE_PRINTF(x86emu_fpu_op_d9_tab1[(rh << 3) + rl]); } #endif switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; - if (rh < 4) { - DECODE_PRINTF2("ST(%d)\n", stkelem); - } else { - DECODE_PRINTF("\n"); - } + case 3: /* register to register */ + stkelem = (u8) rl; + if (rh < 4) { + DECODE_PRINTF2("ST(%d)\n", stkelem); + } + else { + DECODE_PRINTF("\n"); + } break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { - case 3: + case 3: switch (rh) { - case 0: + case 0: x86emu_fpu_R_fld(X86EMU_FPU_STKTOP, stkelem); break; - case 1: + case 1: x86emu_fpu_R_fxch(X86EMU_FPU_STKTOP, stkelem); break; - case 2: + case 2: switch (rl) { - case 0: + case 0: x86emu_fpu_R_nop(); break; - default: + default: x86emu_fpu_illegal(); break; } - case 3: + case 3: x86emu_fpu_R_fstp(X86EMU_FPU_STKTOP, stkelem); break; - case 4: + case 4: switch (rl) { case 0: x86emu_fpu_R_fchs(X86EMU_FPU_STKTOP); @@ -173,126 +177,126 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1)) } break; - case 5: + case 5: switch (rl) { - case 0: + case 0: x86emu_fpu_R_fld1(X86EMU_FPU_STKTOP); break; - case 1: + case 1: x86emu_fpu_R_fldl2t(X86EMU_FPU_STKTOP); break; - case 2: + case 2: x86emu_fpu_R_fldl2e(X86EMU_FPU_STKTOP); break; - case 3: + case 3: x86emu_fpu_R_fldpi(X86EMU_FPU_STKTOP); break; - case 4: + case 4: x86emu_fpu_R_fldlg2(X86EMU_FPU_STKTOP); break; - case 5: + case 5: x86emu_fpu_R_fldln2(X86EMU_FPU_STKTOP); break; - case 6: + case 6: x86emu_fpu_R_fldz(X86EMU_FPU_STKTOP); break; - default: + default: /* 7 */ x86emu_fpu_illegal(); break; } break; - case 6: + case 6: switch (rl) { - case 0: + case 0: x86emu_fpu_R_f2xm1(X86EMU_FPU_STKTOP); break; - case 1: + case 1: x86emu_fpu_R_fyl2x(X86EMU_FPU_STKTOP); break; - case 2: + case 2: x86emu_fpu_R_fptan(X86EMU_FPU_STKTOP); break; - case 3: + case 3: x86emu_fpu_R_fpatan(X86EMU_FPU_STKTOP); break; - case 4: + case 4: x86emu_fpu_R_fxtract(X86EMU_FPU_STKTOP); break; - case 5: + case 5: x86emu_fpu_illegal(); break; - case 6: + case 6: x86emu_fpu_R_decstp(); break; - case 7: + case 7: x86emu_fpu_R_incstp(); break; } break; - case 7: + case 7: switch (rl) { - case 0: + case 0: x86emu_fpu_R_fprem(X86EMU_FPU_STKTOP); break; - case 1: + case 1: x86emu_fpu_R_fyl2xp1(X86EMU_FPU_STKTOP); break; - case 2: + case 2: x86emu_fpu_R_fsqrt(X86EMU_FPU_STKTOP); break; - case 3: + case 3: x86emu_fpu_illegal(); break; - case 4: + case 4: x86emu_fpu_R_frndint(X86EMU_FPU_STKTOP); break; - case 5: + case 5: x86emu_fpu_R_fscale(X86EMU_FPU_STKTOP); break; - case 6: - case 7: - default: + case 6: + case 7: + default: x86emu_fpu_illegal(); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fld(X86EMU_FPU_FLOAT, destoffset); break; - case 1: + case 1: x86emu_fpu_illegal(); break; - case 2: + case 2: x86emu_fpu_M_fst(X86EMU_FPU_FLOAT, destoffset); break; - case 3: + case 3: x86emu_fpu_M_fstp(X86EMU_FPU_FLOAT, destoffset); break; - case 4: + case 4: x86emu_fpu_M_fldenv(X86EMU_FPU_WORD, destoffset); break; - case 5: + case 5: x86emu_fpu_M_fldcw(X86EMU_FPU_WORD, destoffset); break; - case 6: + case 6: x86emu_fpu_M_fstenv(X86EMU_FPU_WORD, destoffset); break; - case 7: + case 7: x86emu_fpu_M_fstcw(X86EMU_FPU_WORD, destoffset); break; } } } #else - (void)destoffset; - (void)stkelem; -#endif /* X86EMU_FPU_PRESENT */ + (void) destoffset; + (void) stkelem; +#endif /* X86EMU_FPU_PRESENT */ DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } @@ -309,7 +313,7 @@ static const char *x86emu_fpu_op_da_tab[] = { "FICOMP\tDWORD PTR ", "FISUB\tDWORD PTR ", "FISUBR\tDWORD PTR ", "FIDIV\tDWORD PTR ", "FIDIVR\tDWORD PTR ", - + "FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ", "FICOMP\tDWORD PTR ", "FISUB\tDWORD PTR ", "FISUBR\tDWORD PTR ", "FIDIV\tDWORD PTR ", @@ -319,10 +323,11 @@ static const char *x86emu_fpu_op_da_tab[] = { "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xda */ -void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -332,59 +337,59 @@ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1)) FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_da_tab, mod, rh, rl); switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; + case 3: /* register to register */ + stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { - case 3: + case 3: x86emu_fpu_illegal(); break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_iadd(X86EMU_FPU_SHORT, destoffset); break; - case 1: + case 1: x86emu_fpu_M_imul(X86EMU_FPU_SHORT, destoffset); break; - case 2: + case 2: x86emu_fpu_M_icom(X86EMU_FPU_SHORT, destoffset); break; - case 3: + case 3: x86emu_fpu_M_icomp(X86EMU_FPU_SHORT, destoffset); break; - case 4: + case 4: x86emu_fpu_M_isub(X86EMU_FPU_SHORT, destoffset); break; - case 5: + case 5: x86emu_fpu_M_isubr(X86EMU_FPU_SHORT, destoffset); break; - case 6: + case 6: x86emu_fpu_M_idiv(X86EMU_FPU_SHORT, destoffset); break; - case 7: + case 7: x86emu_fpu_M_idivr(X86EMU_FPU_SHORT, destoffset); break; } } #else - (void)destoffset; - (void)stkelem; + (void) destoffset; + (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); @@ -403,10 +408,11 @@ static const char *x86emu_fpu_op_db_tab[] = { "ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xdb */ -void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -416,97 +422,99 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1)) #ifdef DEBUG if (mod != 3) { DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl); - } else if (rh == 4) { /* === 11 10 0 nnn */ + } + else if (rh == 4) { /* === 11 10 0 nnn */ switch (rl) { - case 0: + case 0: DECODE_PRINTF("FENI\n"); break; - case 1: + case 1: DECODE_PRINTF("FDISI\n"); break; - case 2: + case 2: DECODE_PRINTF("FCLEX\n"); break; - case 3: + case 3: DECODE_PRINTF("FINIT\n"); break; } - } else { + } + else { DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl)); } -#endif /* DEBUG */ +#endif /* DEBUG */ switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); break; - case 3: /* register to register */ + case 3: /* register to register */ break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { - case 3: + case 3: switch (rh) { - case 4: + case 4: switch (rl) { - case 0: + case 0: x86emu_fpu_R_feni(); break; - case 1: + case 1: x86emu_fpu_R_fdisi(); break; - case 2: + case 2: x86emu_fpu_R_fclex(); break; - case 3: + case 3: x86emu_fpu_R_finit(); break; - default: + default: x86emu_fpu_illegal(); break; } break; - default: + default: x86emu_fpu_illegal(); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fild(X86EMU_FPU_SHORT, destoffset); break; - case 1: + case 1: x86emu_fpu_illegal(); break; - case 2: + case 2: x86emu_fpu_M_fist(X86EMU_FPU_SHORT, destoffset); break; - case 3: + case 3: x86emu_fpu_M_fistp(X86EMU_FPU_SHORT, destoffset); break; - case 4: + case 4: x86emu_fpu_illegal(); break; - case 5: + case 5: x86emu_fpu_M_fld(X86EMU_FPU_LDBL, destoffset); break; - case 6: + case 6: x86emu_fpu_illegal(); break; - case 7: + case 7: x86emu_fpu_M_fstp(X86EMU_FPU_LDBL, destoffset); break; } } #else - (void)destoffset; + (void) destoffset; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); @@ -532,10 +540,11 @@ static const char *x86emu_fpu_op_dc_tab[] = { "FADD\t", "FMUL\t", "FCOM\t", "FCOMP\t", "FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xdc */ -void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -545,85 +554,85 @@ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1)) FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_dc_tab, mod, rh, rl); switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; + case 3: /* register to register */ + stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { - case 3: + case 3: switch (rh) { - case 0: + case 0: x86emu_fpu_R_fadd(stkelem, X86EMU_FPU_STKTOP); break; - case 1: + case 1: x86emu_fpu_R_fmul(stkelem, X86EMU_FPU_STKTOP); break; - case 2: + case 2: x86emu_fpu_R_fcom(stkelem, X86EMU_FPU_STKTOP); break; - case 3: + case 3: x86emu_fpu_R_fcomp(stkelem, X86EMU_FPU_STKTOP); break; - case 4: + case 4: x86emu_fpu_R_fsubr(stkelem, X86EMU_FPU_STKTOP); break; - case 5: + case 5: x86emu_fpu_R_fsub(stkelem, X86EMU_FPU_STKTOP); break; - case 6: + case 6: x86emu_fpu_R_fdivr(stkelem, X86EMU_FPU_STKTOP); break; - case 7: + case 7: x86emu_fpu_R_fdiv(stkelem, X86EMU_FPU_STKTOP); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fadd(X86EMU_FPU_DOUBLE, destoffset); break; - case 1: + case 1: x86emu_fpu_M_fmul(X86EMU_FPU_DOUBLE, destoffset); break; - case 2: + case 2: x86emu_fpu_M_fcom(X86EMU_FPU_DOUBLE, destoffset); break; - case 3: + case 3: x86emu_fpu_M_fcomp(X86EMU_FPU_DOUBLE, destoffset); break; - case 4: + case 4: x86emu_fpu_M_fsub(X86EMU_FPU_DOUBLE, destoffset); break; - case 5: + case 5: x86emu_fpu_M_fsubr(X86EMU_FPU_DOUBLE, destoffset); break; - case 6: + case 6: x86emu_fpu_M_fdiv(X86EMU_FPU_DOUBLE, destoffset); break; - case 7: + case 7: x86emu_fpu_M_fdivr(X86EMU_FPU_DOUBLE, destoffset); break; } } #else - (void)destoffset; - (void)stkelem; + (void) destoffset; + (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); @@ -645,10 +654,11 @@ static const char *x86emu_fpu_op_dd_tab[] = { "ESC_DD\t2C,", "ESC_DD\t2D,", "ESC_DD\t2E,", "ESC_DD\t2F,", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xdd */ -void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -658,75 +668,75 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1)) FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_dd_tab, mod, rh, rl); switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; + case 3: /* register to register */ + stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { - case 3: + case 3: switch (rh) { - case 0: + case 0: x86emu_fpu_R_ffree(stkelem); break; - case 1: + case 1: x86emu_fpu_R_fxch(stkelem); break; - case 2: + case 2: x86emu_fpu_R_fst(stkelem); /* register version */ break; - case 3: + case 3: x86emu_fpu_R_fstp(stkelem); /* register version */ break; - default: + default: x86emu_fpu_illegal(); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fld(X86EMU_FPU_DOUBLE, destoffset); break; - case 1: + case 1: x86emu_fpu_illegal(); break; - case 2: + case 2: x86emu_fpu_M_fst(X86EMU_FPU_DOUBLE, destoffset); break; - case 3: + case 3: x86emu_fpu_M_fstp(X86EMU_FPU_DOUBLE, destoffset); break; - case 4: + case 4: x86emu_fpu_M_frstor(X86EMU_FPU_WORD, destoffset); break; - case 5: + case 5: x86emu_fpu_illegal(); break; - case 6: + case 6: x86emu_fpu_M_fsave(X86EMU_FPU_WORD, destoffset); break; - case 7: + case 7: x86emu_fpu_M_fstsw(X86EMU_FPU_WORD, destoffset); break; } } #else - (void)destoffset; - (void)stkelem; + (void) destoffset; + (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); @@ -734,8 +744,7 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1)) #ifdef DEBUG -static const char *x86emu_fpu_op_de_tab[] = -{ +static const char *x86emu_fpu_op_de_tab[] = { "FIADD\tWORD PTR ", "FIMUL\tWORD PTR ", "FICOM\tWORD PTR ", "FICOMP\tWORD PTR ", "FISUB\tWORD PTR ", "FISUBR\tWORD PTR ", "FIDIV\tWORD PTR ", @@ -755,10 +764,11 @@ static const char *x86emu_fpu_op_de_tab[] = "FSUBRP\t", "FSUBP\t", "FDIVRP\t", "FDIVP\t", }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xde */ -void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -768,87 +778,87 @@ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1)) FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_de_tab, mod, rh, rl); switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; + case 3: /* register to register */ + stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { - case 3: + case 3: switch (rh) { - case 0: + case 0: x86emu_fpu_R_faddp(stkelem, X86EMU_FPU_STKTOP); break; - case 1: + case 1: x86emu_fpu_R_fmulp(stkelem, X86EMU_FPU_STKTOP); break; - case 2: + case 2: x86emu_fpu_R_fcomp(stkelem, X86EMU_FPU_STKTOP); break; - case 3: + case 3: if (stkelem == 1) - x86emu_fpu_R_fcompp(stkelem, X86EMU_FPU_STKTOP); + x86emu_fpu_R_fcompp(stkelem, X86EMU_FPU_STKTOP); else - x86emu_fpu_illegal(); + x86emu_fpu_illegal(); break; - case 4: + case 4: x86emu_fpu_R_fsubrp(stkelem, X86EMU_FPU_STKTOP); break; - case 5: + case 5: x86emu_fpu_R_fsubp(stkelem, X86EMU_FPU_STKTOP); break; - case 6: + case 6: x86emu_fpu_R_fdivrp(stkelem, X86EMU_FPU_STKTOP); break; - case 7: + case 7: x86emu_fpu_R_fdivp(stkelem, X86EMU_FPU_STKTOP); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fiadd(X86EMU_FPU_WORD, destoffset); break; - case 1: + case 1: x86emu_fpu_M_fimul(X86EMU_FPU_WORD, destoffset); break; - case 2: + case 2: x86emu_fpu_M_ficom(X86EMU_FPU_WORD, destoffset); break; - case 3: + case 3: x86emu_fpu_M_ficomp(X86EMU_FPU_WORD, destoffset); break; - case 4: + case 4: x86emu_fpu_M_fisub(X86EMU_FPU_WORD, destoffset); break; - case 5: + case 5: x86emu_fpu_M_fisubr(X86EMU_FPU_WORD, destoffset); break; - case 6: + case 6: x86emu_fpu_M_fidiv(X86EMU_FPU_WORD, destoffset); break; - case 7: + case 7: x86emu_fpu_M_fidivr(X86EMU_FPU_WORD, destoffset); break; } } #else - (void)destoffset; - (void)stkelem; + (void) destoffset; + (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); @@ -877,10 +887,11 @@ static const char *x86emu_fpu_op_df_tab[] = { "ESC_DF\t3C,", "ESC_DF\t3D,", "ESC_DF\t3E,", "ESC_DF\t3F," }; -#endif /* DEBUG */ +#endif /* DEBUG */ /* opcode=0xdf */ -void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1)) +void +x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; @@ -890,75 +901,75 @@ void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1)) FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_df_tab, mod, rh, rl); switch (mod) { - case 0: + case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; - case 1: + case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; - case 2: + case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; - case 3: /* register to register */ - stkelem = (u8)rl; + case 3: /* register to register */ + stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d)\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { - case 3: + case 3: switch (rh) { - case 0: + case 0: x86emu_fpu_R_ffree(stkelem); break; - case 1: + case 1: x86emu_fpu_R_fxch(stkelem); break; - case 2: + case 2: x86emu_fpu_R_fst(stkelem); /* register version */ break; - case 3: + case 3: x86emu_fpu_R_fstp(stkelem); /* register version */ break; - default: + default: x86emu_fpu_illegal(); break; } break; - default: + default: switch (rh) { - case 0: + case 0: x86emu_fpu_M_fild(X86EMU_FPU_WORD, destoffset); break; - case 1: + case 1: x86emu_fpu_illegal(); break; - case 2: + case 2: x86emu_fpu_M_fist(X86EMU_FPU_WORD, destoffset); break; - case 3: + case 3: x86emu_fpu_M_fistp(X86EMU_FPU_WORD, destoffset); break; - case 4: + case 4: x86emu_fpu_M_fbld(X86EMU_FPU_BSD, destoffset); break; - case 5: + case 5: x86emu_fpu_M_fild(X86EMU_FPU_LONG, destoffset); break; - case 6: + case 6: x86emu_fpu_M_fbstp(X86EMU_FPU_BSD, destoffset); break; - case 7: + case 7: x86emu_fpu_M_fistp(X86EMU_FPU_LONG, destoffset); break; } } #else - (void)destoffset; - (void)stkelem; + (void) destoffset; + (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); |