diff options
author | Hao Wu <hao.a.wu@intel.com> | 2019-01-04 10:35:04 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2019-01-05 09:46:31 +0800 |
commit | 46f4c9677c615d862649459392f8f55b3e6567c2 (patch) | |
tree | c0e31ded31f8851ade605ecb59aadbb1ccf69d06 /MdeModulePkg/Bus | |
parent | 38f3c1b0d274bb56b5a48b38f30fdd128ed617c3 (diff) | |
download | edk2-46f4c9677c615d862649459392f8f55b3e6567c2.tar.gz edk2-46f4c9677c615d862649459392f8f55b3e6567c2.tar.bz2 edk2-46f4c9677c615d862649459392f8f55b3e6567c2.zip |
MdeModulePkg/SdMmcPciHcDxe: Fix VS2015 IA32 NOOPT build failure
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1425
This commit will resolve the VS2015 IA32 NOOPT build failure within
SdMmcPciHcDxe.
More specifically, this commit will use BaseLib API RShiftU64() to perform
right-shift operations for UINT64 type operators.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Bi Dandan <dandan.bi@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index 6086720fa1..5aec8c6992 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -1505,7 +1505,7 @@ BuildAdmaDescTable ( Trb->Adma32Desc[Index].Valid = 1;
Trb->Adma32Desc[Index].Act = 2;
if (DataLength26) {
- Trb->Adma32Desc[Index].UpperLength = (UINT16)(Remaining >> 16);
+ Trb->Adma32Desc[Index].UpperLength = (UINT16)RShiftU64 (Remaining, 16);
}
Trb->Adma32Desc[Index].LowerLength = (UINT16)(Remaining & MAX_UINT16);
Trb->Adma32Desc[Index].Address = (UINT32)Address;
@@ -1524,11 +1524,11 @@ BuildAdmaDescTable ( Trb->Adma64Desc[Index].Valid = 1;
Trb->Adma64Desc[Index].Act = 2;
if (DataLength26) {
- Trb->Adma64Desc[Index].UpperLength = (UINT16)(Remaining >> 16);
+ Trb->Adma64Desc[Index].UpperLength = (UINT16)RShiftU64 (Remaining, 16);
}
Trb->Adma64Desc[Index].LowerLength = (UINT16)(Remaining & MAX_UINT16);
Trb->Adma64Desc[Index].LowerAddress = (UINT32)Address;
- Trb->Adma64Desc[Index].UpperAddress = (UINT32)(Address >> 32);
+ Trb->Adma64Desc[Index].UpperAddress = (UINT32)RShiftU64 (Address, 32);
break;
} else {
Trb->Adma64Desc[Index].Valid = 1;
@@ -1538,7 +1538,7 @@ BuildAdmaDescTable ( }
Trb->Adma64Desc[Index].LowerLength = 0;
Trb->Adma64Desc[Index].LowerAddress = (UINT32)Address;
- Trb->Adma64Desc[Index].UpperAddress = (UINT32)(Address >> 32);
+ Trb->Adma64Desc[Index].UpperAddress = (UINT32)RShiftU64 (Address, 32);
}
}
|