[FAST486]

Fix MSVC warnings

svn path=/trunk/; revision=67146
This commit is contained in:
Timo Kreuzer 2015-04-10 22:36:13 +00:00
parent 02da43250f
commit 7410f3a036
7 changed files with 39 additions and 39 deletions

View file

@ -545,7 +545,7 @@ Fast486TaskSwitch(PFAST486_STATE State, FAST486_TASK_SWITCH_TYPE Type, USHORT Se
/* Make sure the entry exists in the GDT (not LDT!) */ /* Make sure the entry exists in the GDT (not LDT!) */
if ((GET_SEGMENT_INDEX(Selector) == 0) if ((GET_SEGMENT_INDEX(Selector) == 0)
|| (Selector & SEGMENT_TABLE_INDICATOR) || (Selector & SEGMENT_TABLE_INDICATOR)
|| GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1)) || GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1u))
{ {
Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_TS, Selector); Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_TS, Selector);
return FALSE; return FALSE;

View file

@ -35,8 +35,8 @@
/* Block size for string operations */ /* Block size for string operations */
#define STRING_BLOCK_SIZE 4096 #define STRING_BLOCK_SIZE 4096
#define GET_SEGMENT_RPL(s) ((s) & 3) #define GET_SEGMENT_RPL(s) ((s) & 3u)
#define GET_SEGMENT_INDEX(s) ((s) & 0xFFF8) #define GET_SEGMENT_INDEX(s) ((s) & 0xFFF8u)
#define SEGMENT_TABLE_INDICATOR (1 << 2) #define SEGMENT_TABLE_INDICATOR (1 << 2)
#define EXCEPTION_HAS_ERROR_CODE(x) (((x) == 8) || ((x) >= 10 && (x) <= 14)) #define EXCEPTION_HAS_ERROR_CODE(x) (((x) == 8) || ((x) >= 10 && (x) <= 14))

View file

@ -52,7 +52,7 @@
#endif #endif
FORCEINLINE FORCEINLINE
INT UINT
FASTCALL FASTCALL
Fast486GetCurrentPrivLevel(PFAST486_STATE State) Fast486GetCurrentPrivLevel(PFAST486_STATE State)
{ {
@ -447,7 +447,7 @@ Fast486ReadDescriptorEntry(PFAST486_STATE State,
if (!(Selector & SEGMENT_TABLE_INDICATOR)) if (!(Selector & SEGMENT_TABLE_INDICATOR))
{ {
/* Make sure the GDT contains the entry */ /* Make sure the GDT contains the entry */
if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1)) if (GET_SEGMENT_INDEX(Selector) >= (State->Gdtr.Size + 1u))
{ {
*EntryValid = FALSE; *EntryValid = FALSE;
return TRUE; return TRUE;
@ -468,7 +468,7 @@ Fast486ReadDescriptorEntry(PFAST486_STATE State,
else else
{ {
/* Make sure the LDT contains the entry */ /* Make sure the LDT contains the entry */
if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1)) if (GET_SEGMENT_INDEX(Selector) >= (State->Ldtr.Limit + 1u))
{ {
*EntryValid = FALSE; *EntryValid = FALSE;
return TRUE; return TRUE;

View file

@ -1642,7 +1642,7 @@ FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBtc)
FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf) FAST486_OPCODE_HANDLER(Fast486ExtOpcodeBsf)
{ {
INT i; UINT i;
ULONG Value = 0; ULONG Value = 0;
BOOLEAN OperandSize, AddressSize; BOOLEAN OperandSize, AddressSize;
FAST486_MOD_REG_RM ModRegRm; FAST486_MOD_REG_RM ModRegRm;

View file

@ -580,8 +580,8 @@ Fast486FpuAdd(PFAST486_STATE State,
else TempResult.Sign = FALSE; else TempResult.Sign = FALSE;
/* Invert the negative mantissa */ /* Invert the negative mantissa */
if (FirstAdjusted.Sign) FirstAdjusted.Mantissa = -FirstAdjusted.Mantissa; if (FirstAdjusted.Sign) FirstAdjusted.Mantissa = -(LONGLONG)FirstAdjusted.Mantissa;
if (SecondAdjusted.Sign) SecondAdjusted.Mantissa = -SecondAdjusted.Mantissa; if (SecondAdjusted.Sign) SecondAdjusted.Mantissa = -(LONGLONG)SecondAdjusted.Mantissa;
/* Calculate the mantissa of the result */ /* Calculate the mantissa of the result */
TempResult.Mantissa = FirstAdjusted.Mantissa + SecondAdjusted.Mantissa; TempResult.Mantissa = FirstAdjusted.Mantissa + SecondAdjusted.Mantissa;

View file

@ -4154,7 +4154,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodePushFlags)
FAST486_OPCODE_HANDLER(Fast486OpcodePopFlags) FAST486_OPCODE_HANDLER(Fast486OpcodePopFlags)
{ {
BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size;
INT Cpl = Fast486GetCurrentPrivLevel(State); UINT Cpl = Fast486GetCurrentPrivLevel(State);
FAST486_FLAGS_REG NewFlags; FAST486_FLAGS_REG NewFlags;
NO_LOCK_PREFIX(); NO_LOCK_PREFIX();
@ -4487,8 +4487,8 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeRetFar)
if ((State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) && !State->Flags.Vm) if ((State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) && !State->Flags.Vm)
{ {
INT i; UINT i;
INT OldCpl = Fast486GetCurrentPrivLevel(State); UINT OldCpl = Fast486GetCurrentPrivLevel(State);
ULONG StackPtr; ULONG StackPtr;
ULONG StackSel; ULONG StackSel;
@ -4658,7 +4658,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeIret)
/* Check for protected mode */ /* Check for protected mode */
if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE)
{ {
INT OldCpl = Fast486GetCurrentPrivLevel(State); UINT OldCpl = Fast486GetCurrentPrivLevel(State);
if (State->Flags.Vm) if (State->Flags.Vm)
{ {

View file

@ -1142,7 +1142,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeGroupF7)
case 3: case 3:
{ {
/* Calculate the result */ /* Calculate the result */
ULONG Result = -Value; ULONG Result = -(LONG)Value;
if (!OperandSize) Result &= 0xFFFF; if (!OperandSize) Result &= 0xFFFF;
/* Update the flags */ /* Update the flags */