/** @file\r
Contains code that implements the virtual machine.\r
\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
UINT64 U64EbcEntryPoint;\r
INT32 Offset;\r
\r
+ Thunk = NULL;\r
Operands = GETOPERANDS (VmPtr);\r
switch (Operands) {\r
//\r
//\r
// Get the data from the source.\r
//\r
- Op2 = (UINT64) (VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index);\r
+ Op2 = (UINT64)(INT64)(INTN)(VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index);\r
if (OPERAND2_INDIRECT (Operands)) {\r
- Op2 = (UINT64) VmReadMemN (VmPtr, (UINTN) Op2);\r
+ Op2 = (UINT64)(INT64)(INTN)VmReadMemN (VmPtr, (UINTN) Op2);\r
}\r
//\r
// Now write back the result.\r
//\r
// Get the data from the source.\r
//\r
- Op2 = (UINT64) (VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index);\r
+ Op2 = (UINT64)(INT64)(INTN)(INT64)(VmPtr->Gpr[OPERAND2_REGNUM (Operands)] + Op2Index);\r
if (OPERAND2_INDIRECT (Operands)) {\r
- Op2 = (UINT64) VmReadMemN (VmPtr, (UINTN) Op2);\r
+ Op2 = (UINT64)(INT64)(INTN)(INT64)VmReadMemN (VmPtr, (UINTN) Op2);\r
}\r
//\r
// Now write back the result.\r
if (Flag != 0) {\r
VMFLAG_SET (VmPtr, VMFLAGS_CC);\r
} else {\r
- VMFLAG_CLEAR (VmPtr, VMFLAGS_CC);\r
+ VMFLAG_CLEAR (VmPtr, (UINT64)VMFLAGS_CC);\r
}\r
//\r
// Advance the IP\r
if (Flag != 0) {\r
VMFLAG_SET (VmPtr, VMFLAGS_CC);\r
} else {\r
- VMFLAG_CLEAR (VmPtr, VMFLAGS_CC);\r
+ VMFLAG_CLEAR (VmPtr, (UINT64)VMFLAGS_CC);\r
}\r
//\r
// Advance the IP\r