mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-07 14:10:23 +00:00
5d707cf831
Another CPU extension we can cross off the list. Addresses #1355
40 lines
546 B
NASM
40 lines
546 B
NASM
%ifdef CONFIG
|
|
{
|
|
"RegData": {
|
|
"RAX": "0",
|
|
"RBX": "1",
|
|
"RCX": "0xFFFFFFFFFFFFFFFF",
|
|
"RDX": "0",
|
|
"RSI": "0xFFFFFFFF",
|
|
"RDI": "1"
|
|
}
|
|
}
|
|
%endif
|
|
|
|
; Test with no overflow
|
|
mov rax, -1
|
|
mov rbx, 1
|
|
adox rax, rbx
|
|
|
|
; Test with overflow (flag set from previous adox)
|
|
mov rbx, 1
|
|
mov rcx, -1
|
|
adox rbx, rcx
|
|
|
|
; Clear OF for 32-bit tests.
|
|
test al, al
|
|
|
|
; 32-bit registers
|
|
|
|
; Test with no overflow
|
|
mov edx, -1
|
|
mov esi, 1
|
|
adox edx, esi
|
|
|
|
; Test with overflow (flag set from previous adox)
|
|
mov edi, 1
|
|
mov esi, -1
|
|
adox edi, esi
|
|
|
|
hlt
|