-
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 #2163 from lioncash/movshdup
OpcodeDispatcher: Handle VMOVSHDUP/VMOVSLDUP
- Loading branch information
Showing
6 changed files
with
120 additions
and
7 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
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,41 @@ | ||
%ifdef CONFIG | ||
{ | ||
"HostFeatures": ["AVX"], | ||
"RegData": { | ||
"XMM1": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0xAAAAAAAAAAAAAAAA", "0x0808080808080808"], | ||
"XMM2": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM3": ["0xEEEEEEEEFFFFFFFF", "0xCCCCCCCCDDDDDDDD", "0xAAAAAAAABBBBBBBB", "0x0808080809090909"], | ||
"XMM4": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0xAAAAAAAAAAAAAAAA", "0x0808080808080808"], | ||
"XMM5": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM6": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0xAAAAAAAAAAAAAAAA", "0x0808080808080808"], | ||
"XMM7": ["0xEEEEEEEEEEEEEEEE", "0xCCCCCCCCCCCCCCCC", "0x0000000000000000", "0x0000000000000000"] | ||
} | ||
} | ||
%endif | ||
|
||
lea rdx, [rel .data] | ||
|
||
;; Broadcast across self | ||
vmovaps ymm1, [rdx] | ||
vmovshdup ymm1, ymm1 | ||
; 128-bit version | ||
vmovaps xmm2, [rdx] | ||
vmovshdup xmm2, xmm2 | ||
|
||
;; Broadcast from different registers | ||
vmovaps ymm3, [rdx] | ||
vmovshdup ymm4, ymm3 | ||
; 128-bit version | ||
vmovshdup xmm5, xmm3 | ||
|
||
;; Broadcast from memory | ||
vmovshdup ymm6, [rdx] | ||
; 128-bit version | ||
vmovshdup xmm7, [rdx] | ||
|
||
hlt | ||
|
||
align 32 | ||
.data: | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xEE, 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC | ||
db 0xBB, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08 |
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,41 @@ | ||
%ifdef CONFIG | ||
{ | ||
"HostFeatures": ["AVX"], | ||
"RegData": { | ||
"XMM1": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0xBBBBBBBBBBBBBBBB", "0x0909090909090909"], | ||
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM3": ["0xEEEEEEEEFFFFFFFF", "0xCCCCCCCCDDDDDDDD", "0xAAAAAAAABBBBBBBB", "0x0808080809090909"], | ||
"XMM4": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0xBBBBBBBBBBBBBBBB", "0x0909090909090909"], | ||
"XMM5": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM6": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0xBBBBBBBBBBBBBBBB", "0x0909090909090909"], | ||
"XMM7": ["0xFFFFFFFFFFFFFFFF", "0xDDDDDDDDDDDDDDDD", "0x0000000000000000", "0x0000000000000000"] | ||
} | ||
} | ||
%endif | ||
|
||
lea rdx, [rel .data] | ||
|
||
;; Broadcast across self | ||
vmovaps ymm1, [rdx] | ||
vmovsldup ymm1, ymm1 | ||
; 128-bit version | ||
vmovaps xmm2, [rdx] | ||
vmovsldup xmm2, xmm2 | ||
|
||
;; Broadcast from different registers | ||
vmovaps ymm3, [rdx] | ||
vmovsldup ymm4, ymm3 | ||
; 128-bit version | ||
vmovsldup xmm5, xmm3 | ||
|
||
;; Broadcast from memory | ||
vmovsldup ymm6, [rdx] | ||
; 128-bit version | ||
vmovsldup xmm7, [rdx] | ||
|
||
hlt | ||
|
||
align 32 | ||
.data: | ||
db 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xEE, 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC | ||
db 0xBB, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08 |