Skip to content
Commit faba4a14 authored by Scott Duplichan's avatar Scott Duplichan Committed by lersek
Browse files

OvmfPkg: VirtioScsiDxe: drop 64-bit shift in PopulateRequest() (VS2010)



"Lun" has type UINT64 in this function. The result of the expression

  (UINT8) ((Lun >> 8) | 0x40)

depends only on bits [15:8] of "Lun", therefore we can cast "Lun" to
UINT32 before shifting it.

This eliminates an intrinsic when building with VS2010 for Ia32 / NOOPT.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: default avatarScott Duplichan <scott@notabs.org>

[lersek@redhat.com: added commit message]

Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>

Build-tested-by: default avatarScott Duplichan <scott@notabs.org>

Reviewed-by: default avatarJordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16386 6f19259b-4bc3-4df7-8a09-765794883524
parent 75f8e3aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment