- Timestamp:
- Sep 7, 2015 7:15:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTBitOperations.cpp
r57647 r57648 210 210 CHECK(ASMAtomicBitTestAndClear(&p->au32[0], 80) && p->au32[2] == ~0x00010001U); 211 211 212 /* range set*/212 /* set range */ 213 213 MAP_CLEAR(p); 214 214 ASMBitSetRange(&p->au32[0], 0, 5); 215 215 ASMBitSetRange(&p->au32[0], 6, 44); 216 216 ASMBitSetRange(&p->au32[0], 64, 65); 217 CHECK(p->au32[0] == 0xFFFFFFDFU); 218 CHECK(p->au32[1] == 0x00000FFFU); 219 CHECK(p->au32[2] == 0x00000001U); 217 CHECK(p->au32[0] == UINT32_C(0xFFFFFFDF)); 218 CHECK(p->au32[1] == UINT32_C(0x00000FFF)); 219 CHECK(p->au32[2] == UINT32_C(0x00000001)); 220 221 MAP_CLEAR(p); 222 volatile int iLow = 0; 223 volatile int iHigh = 5; 224 ASMBitSetRange(&p->au32[0], iLow, iHigh); 225 iLow = 6; iHigh = 44; 226 ASMBitSetRange(&p->au32[0], iLow, iHigh); 227 iLow = 64; iHigh = 65; 228 ASMBitSetRange(&p->au32[0], iLow, iHigh); 229 CHECK(p->au32[0] == UINT32_C(0xFFFFFFDF)); 230 CHECK(p->au32[1] == UINT32_C(0x00000FFF)); 231 CHECK(p->au32[2] == UINT32_C(0x00000001)); 220 232 221 233 /* toggle */
Note:
See TracChangeset
for help on using the changeset viewer.