-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2171 from lioncash/dqa
OpcodeDispatcher: Handle VMOVDQA/VMOVDQU
- Loading branch information
Showing
4 changed files
with
99 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
%ifdef CONFIG | ||
{ | ||
"HostFeatures": ["AVX"], | ||
"RegData": { | ||
"XMM1": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM3": ["0xCCCCCCCCCCCCCCCC", "0xCCCCCCCCCCCCCCCC", "0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD"], | ||
"XMM4": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xEEEEEEEEEEEEEEEE", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM5": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM6": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xEEEEEEEEEEEEEEEE", "0xFFFFFFFFFFFFFFFF"] | ||
} | ||
} | ||
%endif | ||
|
||
lea rdx, [rel .data] | ||
|
||
; Load inputs | ||
vmovdqa ymm1, [rdx] | ||
vmovdqa xmm2, [rdx] | ||
vmovdqa ymm3, [rdx + 32] | ||
|
||
; Test memory overwrite | ||
mov rax, 0xCCCCCCCCCCCCCCCC | ||
mov [rdx + 32], rax | ||
mov rax, 0xDDDDDDDDDDDDDDDD | ||
mov [rdx + 40], rax | ||
mov rax, 0xEEEEEEEEEEEEEEEE | ||
mov [rdx + 48], rax | ||
mov rax, 0xFFFFFFFFFFFFFFFF | ||
mov [rdx + 56], rax | ||
|
||
vmovdqa ymm4, [rdx + 32] | ||
vmovdqa [rdx], xmm4 | ||
vmovapd ymm5, [rdx] | ||
vmovdqa [rdx], ymm4 | ||
vmovapd ymm6, [rdx] | ||
|
||
hlt | ||
|
||
align 32 | ||
.data: | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | ||
db 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC | ||
db 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
%ifdef CONFIG | ||
{ | ||
"HostFeatures": ["AVX"], | ||
"RegData": { | ||
"XMM1": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM3": ["0xCCCCCCCCCCCCCCCC", "0xCCCCCCCCCCCCCCCC", "0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD"], | ||
"XMM4": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xEEEEEEEEEEEEEEEE", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM5": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"], | ||
"XMM6": ["0xCCCCCCCCCCCCCCCC", "0xDDDDDDDDDDDDDDDD", "0xEEEEEEEEEEEEEEEE", "0xFFFFFFFFFFFFFFFF"] | ||
} | ||
} | ||
%endif | ||
|
||
lea rdx, [rel .data] | ||
|
||
; Load inputs | ||
vmovdqu ymm1, [rdx] | ||
vmovdqu xmm2, [rdx] | ||
vmovdqu ymm3, [rdx + 32] | ||
|
||
; Test memory overwrite | ||
mov rax, 0xCCCCCCCCCCCCCCCC | ||
mov [rdx + 32], rax | ||
mov rax, 0xDDDDDDDDDDDDDDDD | ||
mov [rdx + 40], rax | ||
mov rax, 0xEEEEEEEEEEEEEEEE | ||
mov [rdx + 48], rax | ||
mov rax, 0xFFFFFFFFFFFFFFFF | ||
mov [rdx + 56], rax | ||
|
||
vmovdqu ymm4, [rdx + 32] | ||
vmovdqu [rdx], xmm4 | ||
vmovapd ymm5, [rdx] | ||
vmovdqu [rdx], ymm4 | ||
vmovapd ymm6, [rdx] | ||
|
||
hlt | ||
|
||
align 32 | ||
.data: | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF | ||
db 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC | ||
db 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD |