FEX/unittests/ASM/H0F38/adcx.asm
lioncash 5d707cf831 OpcodeDecoder: Add support for ADX
Another CPU extension we can cross off the list.

Addresses #1355
2021-11-10 12:11:01 -05:00

39 lines
396 B
NASM

%ifdef CONFIG
{
"RegData": {
"RAX": "2",
"RBX": "3",
"RCX": "1",
"RDX": "2",
"RSI": "1",
"RDI": "3"
}
}
%endif
; Test with no carry
mov rax, 1
clc
adcx rax, rax
; Test with carry
mov rcx, 1
mov rbx, 1
stc
adcx rbx, rcx
; 32-bit registers
; Test with no carry
mov edx, 1
clc
adcx edx, edx
; Test with carry
mov esi, 1
mov edi, 1
stc
adcx edi, esi
hlt