FEX/unittests/ASM/VEX/bzhi.asm
Ryan Houdek edad24479b unittests: Support skipping unit tests based on host feature support
For these unit tests we no longer need to put them in the disabled tests
file. Instead it will be skipped if the host doesn't support the feature
required.
2022-08-14 20:04:26 -07:00

40 lines
596 B
NASM

%ifdef CONFIG
{
"RegData": {
"RAX": "0xFFFFFFFFFFFFFFFF",
"RBX": "64",
"RCX": "0x00000000000003FF",
"RDX": "10",
"RSI": "0x00000000FFFFFFFF",
"RDI": "32",
"RBP": "0x00000000000003FF",
"RSP": "10"
},
"HostFeatures": ["BMI2"]
}
%endif
; Should not alter the source value
mov rax, -1
mov rbx, 64
bzhi rax, rax, rbx
; General operation
mov rcx, -1
mov rdx, 10
bzhi rcx, rcx, rdx
; 32-bit tests
; Should not alter the source value
mov esi, -1
mov edi, 32
bzhi esi, esi, edi
; General operation
mov ebp, -1
mov esp, 10
bzhi ebp, ebp, esp
hlt