Author: aandrejevic
Date: Wed Sep 4 16:36:39 2013
New Revision: 59990
URL:
http://svn.reactos.org/svn/reactos?rev=59990&view=rev
Log:
[SOFT386]
Fix a typo.
Use a macro (SOFT386_OPCODE_HANDLER) for function definitions of opcode handlers.
Implement the rest of the ADD opcodes.
Modified:
branches/ntvdm/lib/soft386/common.h
branches/ntvdm/lib/soft386/opcodes.c
branches/ntvdm/lib/soft386/opcodes.h
Modified: branches/ntvdm/lib/soft386/common.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/common.h?rev=…
==============================================================================
--- branches/ntvdm/lib/soft386/common.h [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/common.h [iso-8859-1] Wed Sep 4 16:36:39 2013
@@ -201,7 +201,7 @@
inline
BOOLEAN
-Soft386WriteModrnDwordOperands
+Soft386WriteModrmDwordOperands
(
PSOFT386_STATE State,
PSOFT386_MOD_REG_RM ModRegRm,
Modified: branches/ntvdm/lib/soft386/opcodes.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.c?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.c [iso-8859-1] Wed Sep 4 16:36:39 2013
@@ -24,12 +24,12 @@
SOFT386_OPCODE_HANDLER_PROC
Soft386OpcodeHandlers[SOFT386_NUM_OPCODE_HANDLERS] =
{
- Soft386OpcodeAddByteModrm, // TODO: OPCODE 0x00 NOT SUPPORTED
- NULL, // TODO: OPCODE 0x01 NOT SUPPORTED
- Soft386OpcodeAddByteModrm, // TODO: OPCODE 0x02 NOT SUPPORTED
- NULL, // TODO: OPCODE 0x03 NOT SUPPORTED
- NULL, // TODO: OPCODE 0x04 NOT SUPPORTED
- NULL, // TODO: OPCODE 0x05 NOT SUPPORTED
+ Soft386OpcodeAddByteModrm,
+ Soft386OpcodeAddModrm,
+ Soft386OpcodeAddByteModrm,
+ Soft386OpcodeAddModrm,
+ Soft386OpcodeAddAl,
+ Soft386OpcodeAddEax,
NULL, // TODO: OPCODE 0x06 NOT SUPPORTED
NULL, // TODO: OPCODE 0x07 NOT SUPPORTED
NULL, // TODO: OPCODE 0x08 NOT SUPPORTED
@@ -282,9 +282,7 @@
NULL, // TODO: OPCODE 0xFF NOT SUPPORTED
};
-BOOLEAN
-FASTCALL
-Soft386OpcodePrefix(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodePrefix)
{
BOOLEAN Valid = FALSE;
@@ -445,9 +443,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeIncrement(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeIncrement)
{
ULONG Value;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -490,9 +486,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeDecrement(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeDecrement)
{
ULONG Value;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -535,9 +529,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodePushReg(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodePushReg)
{
if ((State->PrefixFlags != SOFT386_PREFIX_OPSIZE)
&& (State->PrefixFlags != 0))
@@ -554,9 +546,7 @@
return Soft386StackPush(State, State->GeneralRegs[Opcode & 0x07].Long);
}
-BOOLEAN
-FASTCALL
-Soft386OpcodePopReg(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodePopReg)
{
ULONG Value;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_SS].Size;
@@ -587,9 +577,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeNop(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeNop)
{
if (State->PrefixFlags & ~(SOFT386_PREFIX_OPSIZE | SOFT386_PREFIX_REP))
{
@@ -607,9 +595,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeExchangeEax(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeExchangeEax)
{
INT Reg = Opcode & 0x07;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -650,9 +636,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeShortConditionalJmp(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeShortConditionalJmp)
{
BOOLEAN Jump = FALSE;
CHAR Offset = 0;
@@ -742,9 +726,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearCarry(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearCarry)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xF8);
@@ -761,9 +743,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetCarry(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetCarry)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xF9);
@@ -780,9 +760,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeComplCarry(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeComplCarry)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xF5);
@@ -799,9 +777,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearInt(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearInt)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xFA);
@@ -839,9 +815,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetInt(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetInt)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xFB);
@@ -879,9 +853,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearDir(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearDir)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xFC);
@@ -898,9 +870,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetDir(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetDir)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xFD);
@@ -917,9 +887,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeHalt(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeHalt)
{
/* Make sure this is the right instruction */
ASSERT(Opcode == 0xF4);
@@ -945,9 +913,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeInByte(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeInByte)
{
UCHAR Data;
ULONG Port;
@@ -982,9 +948,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeIn(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeIn)
{
ULONG Port;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -1048,9 +1012,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeOutByte(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeOutByte)
{
UCHAR Data;
ULONG Port;
@@ -1085,9 +1047,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeOut(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeOut)
{
ULONG Port;
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -1147,9 +1107,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeShortJump(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeShortJump)
{
CHAR Offset = 0;
@@ -1169,9 +1127,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeMovRegImm(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeMovRegImm)
{
BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
@@ -1222,9 +1178,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeMovByteRegImm(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeMovByteRegImm)
{
UCHAR Value;
@@ -1259,9 +1213,7 @@
return TRUE;
}
-BOOLEAN
-FASTCALL
-Soft386OpcodeAddByteModrm(PSOFT386_STATE State, UCHAR Opcode)
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddByteModrm)
{
UCHAR FirstValue, SecondValue, Result;
SOFT386_MOD_REG_RM ModRegRm;
@@ -1319,3 +1271,222 @@
Opcode & SOFT386_OPCODE_WRITE_REG,
Result);
}
+
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddModrm)
+{
+ SOFT386_MOD_REG_RM ModRegRm;
+ BOOLEAN OperandSize, AddressSize;
+
+ /* Make sure this is the right instruction */
+ ASSERT((Opcode & 0xFD) == 0x01);
+
+ OperandSize = AddressSize = State->SegmentRegs[SOFT386_REG_CS].Size;
+
+ if (State->PrefixFlags & SOFT386_PREFIX_ADSIZE)
+ {
+ /* The ADSIZE prefix toggles the address size */
+ AddressSize = !AddressSize;
+ }
+
+ if (State->PrefixFlags & SOFT386_PREFIX_OPSIZE)
+ {
+ /* The OPSIZE prefix toggles the operand size */
+ OperandSize = !OperandSize;
+ }
+
+ if (State->PrefixFlags
+ & ~(SOFT386_PREFIX_ADSIZE
+ | SOFT386_PREFIX_OPSIZE
+ | SOFT386_PREFIX_SEG
+ | SOFT386_PREFIX_LOCK))
+ {
+ /* Invalid prefix */
+ Soft386Exception(State, SOFT386_EXCEPTION_UD);
+ return FALSE;
+ }
+
+ /* Get the operands */
+ if (!Soft386ParseModRegRm(State, AddressSize, &ModRegRm))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Check the operand size */
+ if (OperandSize)
+ {
+ ULONG FirstValue, SecondValue, Result;
+
+ if (!Soft386ReadModrmDwordOperands(State,
+ &ModRegRm,
+ &FirstValue,
+ &SecondValue))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Calculate the result */
+ Result = FirstValue + SecondValue;
+
+ /* Update the flags */
+ State->Flags.Cf = (Result < FirstValue) && (Result <
SecondValue);
+ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue &
SIGN_FLAG_LONG))
+ && ((FirstValue & SIGN_FLAG_LONG) != (Result &
SIGN_FLAG_LONG));
+ State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) &
0x10) ? TRUE : FALSE;
+ State->Flags.Zf = (Result == 0) ? TRUE : FALSE;
+ State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE;
+ State->Flags.Pf = Soft386CalculateParity(Result);
+
+ /* Write back the result */
+ return Soft386WriteModrmDwordOperands(State,
+ &ModRegRm,
+ Opcode & SOFT386_OPCODE_WRITE_REG,
+ Result);
+ }
+ else
+ {
+ USHORT FirstValue, SecondValue, Result;
+
+ if (!Soft386ReadModrmWordOperands(State,
+ &ModRegRm,
+ &FirstValue,
+ &SecondValue))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Calculate the result */
+ Result = FirstValue + SecondValue;
+
+ /* Update the flags */
+ State->Flags.Cf = (Result < FirstValue) && (Result <
SecondValue);
+ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue &
SIGN_FLAG_WORD))
+ && ((FirstValue & SIGN_FLAG_WORD) != (Result &
SIGN_FLAG_WORD));
+ State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) &
0x10) ? TRUE : FALSE;
+ State->Flags.Zf = (Result == 0) ? TRUE : FALSE;
+ State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE;
+ State->Flags.Pf = Soft386CalculateParity(Result);
+
+ /* Write back the result */
+ return Soft386WriteModrmWordOperands(State,
+ &ModRegRm,
+ Opcode & SOFT386_OPCODE_WRITE_REG,
+ Result);
+ }
+}
+
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddAl)
+{
+ UCHAR FirstValue = State->GeneralRegs[SOFT386_REG_EAX].LowByte;
+ UCHAR SecondValue, Result;
+
+ /* Make sure this is the right instruction */
+ ASSERT(Opcode == 0x04);
+
+ if (State->PrefixFlags)
+ {
+ /* This opcode doesn't take any prefixes */
+ Soft386Exception(State, SOFT386_EXCEPTION_UD);
+ return FALSE;
+ }
+
+ if (!Soft386FetchByte(State, &SecondValue))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Calculate the result */
+ Result = FirstValue + SecondValue;
+
+ /* Update the flags */
+ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue);
+ State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) == (SecondValue &
SIGN_FLAG_BYTE))
+ && ((FirstValue & SIGN_FLAG_BYTE) != (Result &
SIGN_FLAG_BYTE));
+ State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) &
0x10) ? TRUE : FALSE;
+ State->Flags.Zf = (Result == 0) ? TRUE : FALSE;
+ State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE;
+ State->Flags.Pf = Soft386CalculateParity(Result);
+
+ /* Write back the result */
+ State->GeneralRegs[SOFT386_REG_EAX].LowByte = Result;
+
+ return TRUE;
+}
+
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddEax)
+{
+ BOOLEAN Size = State->SegmentRegs[SOFT386_REG_CS].Size;
+
+ /* Make sure this is the right instruction */
+ ASSERT(Opcode == 0x05);
+
+ if (State->PrefixFlags == SOFT386_PREFIX_OPSIZE)
+ {
+ /* The OPSIZE prefix toggles the size */
+ Size = !Size;
+ }
+ else
+ {
+ /* Invalid prefix */
+ Soft386Exception(State, SOFT386_EXCEPTION_UD);
+ return FALSE;
+ }
+
+ if (Size)
+ {
+ ULONG FirstValue = State->GeneralRegs[SOFT386_REG_EAX].Long;
+ ULONG SecondValue, Result;
+
+ if (!Soft386FetchDword(State, &SecondValue))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Calculate the result */
+ Result = FirstValue + SecondValue;
+
+ /* Update the flags */
+ State->Flags.Cf = (Result < FirstValue) && (Result <
SecondValue);
+ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue &
SIGN_FLAG_LONG))
+ && ((FirstValue & SIGN_FLAG_LONG) != (Result &
SIGN_FLAG_LONG));
+ State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) &
0x10) ? TRUE : FALSE;
+ State->Flags.Zf = (Result == 0) ? TRUE : FALSE;
+ State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE;
+ State->Flags.Pf = Soft386CalculateParity(Result);
+
+ /* Write back the result */
+ State->GeneralRegs[SOFT386_REG_EAX].Long = Result;
+ }
+ else
+ {
+ USHORT FirstValue = State->GeneralRegs[SOFT386_REG_EAX].LowWord;
+ USHORT SecondValue, Result;
+
+ if (!Soft386FetchWord(State, &SecondValue))
+ {
+ /* Exception occurred */
+ return FALSE;
+ }
+
+ /* Calculate the result */
+ Result = FirstValue + SecondValue;
+
+ /* Update the flags */
+ State->Flags.Cf = (Result < FirstValue) && (Result <
SecondValue);
+ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue &
SIGN_FLAG_WORD))
+ && ((FirstValue & SIGN_FLAG_WORD) != (Result &
SIGN_FLAG_WORD));
+ State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) &
0x10) ? TRUE : FALSE;
+ State->Flags.Zf = (Result == 0) ? TRUE : FALSE;
+ State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE;
+ State->Flags.Pf = Soft386CalculateParity(Result);
+
+ /* Write back the result */
+ State->GeneralRegs[SOFT386_REG_EAX].LowWord = Result;
+ }
+
+ return TRUE;
+}
Modified: branches/ntvdm/lib/soft386/opcodes.h
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/soft386/opcodes.h?rev…
==============================================================================
--- branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] (original)
+++ branches/ntvdm/lib/soft386/opcodes.h [iso-8859-1] Wed Sep 4 16:36:39 2013
@@ -17,6 +17,9 @@
#define SOFT386_NUM_OPCODE_HANDLERS 256
#define SOFT386_OPCODE_WRITE_REG (1 << 1)
+#define SOFT386_OPCODE_HANDLER(x) BOOLEAN\
+ FASTCALL\
+ (x)(PSOFT386_STATE State, UCHAR Opcode)
typedef BOOLEAN (FASTCALL *SOFT386_OPCODE_HANDLER_PROC)(PSOFT386_STATE, UCHAR);
@@ -24,196 +27,32 @@
SOFT386_OPCODE_HANDLER_PROC
Soft386OpcodeHandlers[SOFT386_NUM_OPCODE_HANDLERS];
-BOOLEAN
-FASTCALL
-Soft386OpcodePrefix
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeIncrement
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeDecrement
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodePushReg
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodePopReg
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeNop
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeExchangeEax
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeShortConditionalJmp
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearCarry
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetCarry
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeComplCarry
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearInt
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetInt
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeClearDir
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeSetDir
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeHalt
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeInByte
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeIn
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeOutByte
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeOut
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeShortJump
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeMovRegImm
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeMovByteRegImm
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
-
-BOOLEAN
-FASTCALL
-Soft386OpcodeAddByteModrm
-(
- PSOFT386_STATE State,
- UCHAR Opcode
-);
+SOFT386_OPCODE_HANDLER(Soft386OpcodePrefix);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeIncrement);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeDecrement);
+SOFT386_OPCODE_HANDLER(Soft386OpcodePushReg);
+SOFT386_OPCODE_HANDLER(Soft386OpcodePopReg);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeNop);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeExchangeEax);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeShortConditionalJmp);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearCarry);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetCarry);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeComplCarry);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearInt);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetInt);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeClearDir);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeSetDir);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeHalt);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeInByte);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeIn);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeOutByte);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeOut);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeShortJump);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeMovRegImm);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeMovByteRegImm);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddByteModrm);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddModrm);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddAl);
+SOFT386_OPCODE_HANDLER(Soft386OpcodeAddEax);
#endif // _OPCODES_H_