diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c index 431ffa3931..c13cd462e4 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c @@ -80,11 +80,21 @@ CompareGuid ( IN CONST GUID *Guid2
)
{
- return (BOOLEAN)(
- ReadUnaligned64 ((CONST UINT64*)Guid1)
- == ReadUnaligned64 ((CONST UINT64*)Guid2) &&
- ReadUnaligned64 ((CONST UINT64*)Guid1 + 1)
- == ReadUnaligned64 ((CONST UINT64*)Guid2 + 1)
+ UINT64 Guid1ValueLo;
+ UINT64 Guid1ValueHi;
+ UINT64 Guid2ValueLo;
+ UINT64 Guid2ValueHi;
+
+ Guid1ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid1);
+ Guid2ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid2);
+
+ Guid1ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid1 + 1);
+ Guid2ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid2 + 1);
+
+
+ return (BOOLEAN)
+ ((Guid1ValueLo == Guid2ValueLo) &&
+ (Guid1ValueHi == Guid2ValueHi)
);
}
|