]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: QemuVideoDxe: the VBE shim needs no 64-bit shifts (VS2010)
authorScott Duplichan <scott@notabs.org>
Fri, 14 Nov 2014 10:23:55 +0000 (10:23 +0000)
committerlersek <lersek@Edk2>
Fri, 14 Nov 2014 10:23:55 +0000 (10:23 +0000)
The SegmentC local variable has type EFI_PHYSICAL_ADDRESS for (justified)
style reasons. However, the 64-bit bit-shifts that it undergoes result in
intrinsic calls when built with VS2010 for Ia32 / NOOPT.

The concrete value of SegmentC, 0xC0000, and the results  of the bitops
that are based on it, are statically computeable. Cast SegmentC to UINT32
before subjecting it to bitwise operations; we can see in advance that
this won't lead to range loss.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Scott Duplichan <scott@notabs.org>
[lersek@redhat.com: dropped now superfluous outermost parens; commit msg]

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16385 6f19259b-4bc3-4df7-8a09-765794883524


No differences found