/* This routine is called by the EBC execute functions to read EBC immediate values from the code stream. Since we can't assume alignment, each tries to read in the biggest chunks size available, but will revert to smaller reads if necessary. */
INT32 VmReadImmed32(IN VM_CONTEXT *VmPtr, IN UINT32 Offset)
/* This routine is called by the EBC execute functions to read EBC immediate values from the code stream. Since we can't assume alignment, each tries to read in the biggest chunks size available, but will revert to smaller reads if necessary. */
INT32 VmReadImmed32(IN VM_CONTEXT *VmPtr, IN UINT32 Offset)
{
  UINT32  Data;
  if (ADDRESS_IS_ALIGNED ((UINTN)VmPtr->Ip + Offset, sizeof (UINT32))) {
    return *(INT32 *)(VmPtr->Ip + Offset);
  }
  Data  = (UINT32)VmReadCode16 (VmPtr, Offset);
  Data |= (UINT32)(VmReadCode16 (VmPtr, Offset + 2) << 16);
  return Data;
}