]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/EbcExecute.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcExecute.c
index a4c51e9b0f614c73a16f2fdbaa75a876ad5ac822..3418936c1012ae5dc7fb832a148faee836f87fc3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Contains code that implements the virtual machine.\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, 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
@@ -1333,11 +1333,11 @@ CONST VM_TABLE_ENTRY           mVmOpcodeTable[] = {
   { ExecuteMOVIn },             // opcode 0x38 - mov immediate natural\r
   { ExecuteMOVREL },            // opcode 0x39 - move data relative to PC\r
   { NULL },                     // opcode 0x3a\r
-  { NULL },                     // opcode 0x3b \r
-  { NULL },                     // opcode 0x3c \r
-  { NULL },                     // opcode 0x3d \r
-  { NULL },                     // opcode 0x3e \r
-  { NULL }                      // opcode 0x3f \r
+  { NULL },                     // opcode 0x3b\r
+  { NULL },                     // opcode 0x3c\r
+  { NULL },                     // opcode 0x3d\r
+  { NULL },                     // opcode 0x3e\r
+  { NULL }                      // opcode 0x3f\r
 };\r
 \r
 //\r
@@ -2867,7 +2867,7 @@ ExecutePOPn (
   if (OPERAND1_INDIRECT (Operands)) {\r
     VmWriteMemN (VmPtr, (UINTN) (VmPtr->Gpr[OPERAND1_REGNUM (Operands)] + Index16), DataN);\r
   } else {\r
-    VmPtr->Gpr[OPERAND1_REGNUM (Operands)] = (INT64) (UINT64) ((UINTN) DataN + Index16);\r
+    VmPtr->Gpr[OPERAND1_REGNUM (Operands)] = (INT64) (UINT64) (UINTN) (DataN + Index16);\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -2987,7 +2987,7 @@ ExecuteCALL (
   Opcode    = GETOPCODE (VmPtr);\r
   Operands  = GETOPERANDS (VmPtr);\r
 \r
-  if (Operands & OPERAND_M_NATIVE_CALL) {\r
+  if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {\r
     EbcDebuggerHookCALLEXStart (VmPtr);\r
   } else {\r
     EbcDebuggerHookCALLStart (VmPtr);\r
@@ -3094,7 +3094,7 @@ ExecuteCALL (
     }\r
   }\r
 \r
-  if (Operands & OPERAND_M_NATIVE_CALL) {\r
+  if ((Operands & OPERAND_M_NATIVE_CALL) != 0) {\r
     EbcDebuggerHookCALLEXEnd (VmPtr);\r
   } else {\r
     EbcDebuggerHookCALLEnd (VmPtr);\r
@@ -3592,7 +3592,7 @@ ExecuteSUB (
   if ((*VmPtr->Ip & DATAMANIP_M_64) != 0) {\r
     return (UINT64) ((INT64) ((INT64) Op1 - (INT64) Op2));\r
   } else {\r
-    return (UINT64) ((INT64) ((INT32) Op1 - (INT32) Op2));\r
+    return (UINT64) ((INT64) ((INT32) ((INT32) Op1 - (INT32) Op2)));\r
   }\r
 }\r
 \r
@@ -3620,7 +3620,7 @@ ExecuteMUL (
   if ((*VmPtr->Ip & DATAMANIP_M_64) != 0) {\r
     return MultS64x64 ((INT64)Op1, (INT64)Op2);\r
   } else {\r
-    return (UINT64) ((INT64) ((INT32) Op1 * (INT32) Op2));\r
+    return (UINT64) ((INT64) ((INT32) ((INT32) Op1 * (INT32) Op2)));\r
   }\r
 }\r
 \r
@@ -3648,7 +3648,7 @@ ExecuteMULU (
   if ((*VmPtr->Ip & DATAMANIP_M_64) != 0) {\r
     return MultU64x64 (Op1, Op2);\r
   } else {\r
-    return (UINT64) ((UINT32) Op1 * (UINT32) Op2);\r
+    return (UINT64) ((UINT32) ((UINT32) Op1 * (UINT32) Op2));\r
   }\r
 }\r
 \r