[FAST486]

The FPU function number is actually just the REG component of a mod-reg-r/m byte.


svn path=/branches/ntvdm/; revision=62346
This commit is contained in:
Aleksandar Andrejevic 2014-02-27 06:11:05 +00:00
parent 2d9fbc6954
commit 931a83808f

View file

@ -35,10 +35,11 @@
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -59,10 +60,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD8)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -83,10 +85,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeD9)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -107,10 +110,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDA)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -131,10 +135,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDB)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -155,10 +160,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDC)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -179,10 +185,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDD)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;
@ -203,10 +210,11 @@ FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDE)
FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF) FAST486_OPCODE_HANDLER(Fast486FpuOpcodeDF)
{ {
UCHAR Function; FAST486_MOD_REG_RM ModRegRm;
BOOLEAN AddressSize = State->SegmentRegs[FAST486_REG_CS].Size;
/* Fetch the function number */ /* Get the operands */
if (!Fast486FetchByte(State, &Function)) if (!Fast486ParseModRegRm(State, AddressSize, &ModRegRm))
{ {
/* Exception occurred */ /* Exception occurred */
return FALSE; return FALSE;