Implementation of TestAndClearBit using compare-exchange primitive\r
\r
Copyright (C) 2015, Linaro Ltd.\r
+ Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
// ensure we round towards -Inf, and end up with a positive shift in\r
// 'Bit', even if 'Bit' itself is negative.\r
//\r
- Address += (Bit >> 4) * sizeof(UINT16);\r
+ Address = (VOID*)((UINT8*) Address + ((Bit >> 4) * sizeof(UINT16)));\r
Mask = 1U << (Bit & 15);\r
\r
for (Word = *(UINT16 *) Address; Word & Mask; Word = Read) {\r