Changeset 97116 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Oct 12, 2022 3:07:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bootsector2-cpu-instr-1-template.mac
r97115 r97116 296 296 mov rbx, -2 297 297 mov rcx, -3 298 cmpxchg ebx, ecx ; Not equal, writes e ax298 cmpxchg ebx, ecx ; Not equal, writes ebx to eax 299 299 mov edx, -2 ; Clears high dword 300 300 TEST_ASSERT_SIMPLE rax, rdx, jz, "CMPXCHG reg, unequal, rax set" … … 333 333 push rbx 334 334 mov rcx, -5 335 cmpxchg [rsp], ecx ; Not equal, writes eax335 cmpxchg [rsp], ecx ; Equal, writes ecx to memory 336 336 mov rdx, -4 ; All ones in high dword 337 337 TEST_ASSERT_SIMPLE rax, rdx, jz, "CMPXCHG mem, equal, rax not set" 338 338 pop rbx 339 340 ; 341 ; CMPXCHG8B mem, reg - values equal, memory written 342 ; compares edx:eax with mem64 343 ; 344 mov rdx, -1 ; Load registers with 64-bit values 345 mov rax, -4 346 mov rcx, -1 347 mov rbx, -5 348 mov rsi, -4 349 push rsi 350 cmpxchg8b [rsp] ; Equal, writes ecx:ebx to memory 351 mov rsi, -4 ; All ones in high dword 352 TEST_ASSERT_SIMPLE rax, rsi, jz, "CMPXCHG8B mem, equal, rax not set" 353 mov rsi, -1 ; All ones in high dword 354 TEST_ASSERT_SIMPLE rdx, rsi, jz, "CMPXCHG8B mem, equal, rdx not set" 355 pop rsi 356 357 ; 358 ; CMPXCHG8B mem, reg - values unequal, edx:eax written 359 ; compares edx:eax with mem64 360 ; 361 mov rdx, -1 ; Load registers with 64-bit values 362 mov rax, -2 363 mov rcx, -1 364 mov rbx, -4 365 mov rsi, -3 366 push rsi 367 cmpxchg8b [rsp] ; Not equal, writes memory to edx:eax 368 mov esi, -3 ; Clears high dword 369 TEST_ASSERT_SIMPLE rax, rsi, jz, "CMPXCHG8B mem, unequal, rax set" 370 mov esi, -1 ; Clears high dword 371 TEST_ASSERT_SIMPLE rdx, rsi, jz, "CMPXCHG8B mem, unequal, rdx set" 372 pop rsi 339 373 340 374 %endif
Note:
See TracChangeset
for help on using the changeset viewer.