mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-14 09:28:34 +00:00
unittests: Adds new VAES tests
This commit is contained in:
parent
542ed8b6ad
commit
8fb801069f
@ -10,6 +10,10 @@ Test_VEX/vaesdeclast.asm
|
||||
Test_VEX/vaesenc.asm
|
||||
Test_VEX/vaesenclast.asm
|
||||
Test_VEX/vaesimc.asm
|
||||
Test_VEX/vaesdec256.asm
|
||||
Test_VEX/vaesdeclast256.asm
|
||||
Test_VEX/vaesenc256.asm
|
||||
Test_VEX/vaesenclast256.asm
|
||||
Test_VEX/vaeskeygenassist.asm
|
||||
|
||||
# PCMUL considered to be part of crypto operations. Simulator doesn't support this.
|
||||
|
49
unittests/ASM/VEX/vaesdec256.asm
Normal file
49
unittests/ASM/VEX/vaesdec256.asm
Normal file
@ -0,0 +1,49 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AES256"],
|
||||
"RegData": {
|
||||
"XMM1": ["0x7A1FC5A0A07A1FC5", "0xC5A07A1F1FC5A07A", "0x7a1fc5a0a07a1fc5", "0xc5a07a1f1fc5a07a"],
|
||||
"XMM2": ["0x85E03A5F5F85E03A", "0x3A5F85E0E03A5F85", "0x85e03a5f5f85e03a", "0x3a5f85e0e03a5f85"],
|
||||
"XMM3": ["0x7A1FC5A1A07A1FC4", "0xC5A07A1E1FC5A07B", "0x7a1fc5a1a07a1fc4", "0xc5a07a1e1fc5a07b"],
|
||||
"XMM4": ["0x85E03A5FA07A1FC5", "0xC5A07A1EE03A5F85", "0x85e03a5fa07a1fc5", "0xc5a07a1ee03a5f85"]
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx + 32 * 4]
|
||||
|
||||
vaesdec ymm1, ymm0, [rdx + 32 * 0]
|
||||
vaesdec ymm2, ymm0, [rdx + 32 * 1]
|
||||
vaesdec ymm3, ymm0, [rdx + 32 * 2]
|
||||
vaesdec ymm4, ymm0, [rdx + 32 * 3]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
49
unittests/ASM/VEX/vaesdeclast256.asm
Normal file
49
unittests/ASM/VEX/vaesdeclast256.asm
Normal file
@ -0,0 +1,49 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AES256"],
|
||||
"RegData": {
|
||||
"XMM1": ["0xD5D56A6A6AD5D56A", "0x6A6AD5D5D56A6AD5", "0xd5d56a6a6ad5d56a", "0x6a6ad5d5d56a6ad5"],
|
||||
"XMM2": ["0x2A2A9595952A2A95", "0x95952A2A2A95952A", "0x2a2a9595952a2a95", "0x95952a2a2a95952a"],
|
||||
"XMM3": ["0xD5D56A6B6AD5D56B", "0x6A6AD5D4D56A6AD4", "0xd5d56a6b6ad5d56b", "0x6a6ad5d4d56a6ad4"],
|
||||
"XMM4": ["0x2A2A95956AD5D56A", "0x6A6AD5D42A95952A", "0x2a2a95956ad5d56a", "0x6a6ad5d42a95952a"]
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx + 32 * 4]
|
||||
|
||||
vaesdeclast ymm1, ymm0, [rdx + 32 * 0]
|
||||
vaesdeclast ymm2, ymm0, [rdx + 32 * 1]
|
||||
vaesdeclast ymm3, ymm0, [rdx + 32 * 2]
|
||||
vaesdeclast ymm4, ymm0, [rdx + 32 * 3]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
49
unittests/ASM/VEX/vaesenc256.asm
Normal file
49
unittests/ASM/VEX/vaesenc256.asm
Normal file
@ -0,0 +1,49 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AES256"],
|
||||
"RegData": {
|
||||
"XMM1": ["0x77637B6F637B6F77", "0x7B6F77636F77637B", "0x77637b6f637b6f77", "0x7b6f77636f77637b"],
|
||||
"XMM2": ["0x889C84909C849088", "0x8490889C90889C84", "0x889c84909c849088", "0x8490889c90889c84"],
|
||||
"XMM3": ["0x77637B6E637B6F76", "0x7B6F77626F77637A", "0x77637b6e637b6f76", "0x7b6f77626f77637a"],
|
||||
"XMM4": ["0x889C8490637B6F77", "0x7B6F776290889C84", "0x889c8490637b6f77", "0x7b6f776290889c84"]
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx + 32 * 4]
|
||||
|
||||
vaesenc ymm1, ymm0, [rdx + 32 * 0]
|
||||
vaesenc ymm2, ymm0, [rdx + 32 * 1]
|
||||
vaesenc ymm3, ymm0, [rdx + 32 * 2]
|
||||
vaesenc ymm4, ymm0, [rdx + 32 * 3]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
49
unittests/ASM/VEX/vaesenclast256.asm
Normal file
49
unittests/ASM/VEX/vaesenclast256.asm
Normal file
@ -0,0 +1,49 @@
|
||||
%ifdef CONFIG
|
||||
{
|
||||
"HostFeatures": ["AES256"],
|
||||
"RegData": {
|
||||
"XMM1": ["0x777B7B777B7B7777", "0x7B77777B77777B7B", "0x777b7b777b7b7777", "0x7b77777b77777b7b"],
|
||||
"XMM2": ["0x8884848884848888", "0x8488888488888484", "0x8884848884848888", "0x8488888488888484"],
|
||||
"XMM3": ["0x777B7B767B7B7776", "0x7B77777A77777B7A", "0x777b7b767b7b7776", "0x7b77777a77777b7a"],
|
||||
"XMM4": ["0x888484887B7B7777", "0x7B77777A88888484", "0x888484887b7b7777", "0x7b77777a88888484"]
|
||||
}
|
||||
}
|
||||
%endif
|
||||
|
||||
lea rdx, [rel .data]
|
||||
|
||||
vmovaps ymm0, [rdx + 32 * 4]
|
||||
|
||||
vaesenclast ymm1, ymm0, [rdx + 32 * 0]
|
||||
vaesenclast ymm2, ymm0, [rdx + 32 * 1]
|
||||
vaesenclast ymm3, ymm0, [rdx + 32 * 2]
|
||||
vaesenclast ymm4, ymm0, [rdx + 32 * 3]
|
||||
|
||||
hlt
|
||||
|
||||
align 32
|
||||
.data:
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
dq 0x0000000000000000
|
||||
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
dq 0xFFFFFFFFFFFFFFFF
|
||||
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
dq 0x0000000100000001
|
||||
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
dq 0xFFFFFFFF00000000
|
||||
dq 0x00000001FFFFFFFF
|
||||
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
||||
dq 0x0202020202020202
|
||||
dq 0x0303030303030303
|
Loading…
Reference in New Issue
Block a user