Author: aandrejevic Date: Thu Feb 27 06:11:05 2014 New Revision: 62346
URL: http://svn.reactos.org/svn/reactos?rev=62346&view=rev Log: [FAST486] The FPU function number is actually just the REG component of a mod-reg-r/m byte.
Modified: branches/ntvdm/lib/fast486/fpu.c
Modified: branches/ntvdm/lib/fast486/fpu.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/fpu.c?rev=6234... ============================================================================== --- branches/ntvdm/lib/fast486/fpu.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/fpu.c [iso-8859-1] Thu Feb 27 06:11:05 2014 @@ -35,10 +35,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -59,10 +60,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -83,10 +85,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -107,10 +110,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -131,10 +135,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -155,10 +160,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -179,10 +185,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE; @@ -203,10 +210,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF) { - UCHAR Function; - - /* Fetch the function number */ - if (!Fast486FetchByte(State, &Function)) + FAST486_MOD_REG_RM ModRegRm; + BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size; + + /* Get the operands */ + if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm)) { /* Exception occurred */ return FALSE;