-
Notifications
You must be signed in to change notification settings - Fork 123
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 #2301 from lioncash/insps
OpcodeDispatcher: Handle VINSERTPS
- Loading branch information
Showing
5 changed files
with
96 additions
and
20 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,52 @@ | ||
%ifdef CONFIG | ||
{ | ||
"HostFeatures": ["AVX"], | ||
"RegData": { | ||
"XMM2": ["0x4142434465666768", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM3": ["0x4142434461626364", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM4": ["0x7576777845464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM5": ["0x4142434445464748", "0x5152535471727374", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM6": ["0x4142434445464748", "0x7576777855565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM7": ["0x4142434445464748", "0x5152535475767778", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM8": ["0x7576777845464748", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM9": ["0x4142434475767778", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM10": ["0x0000000065666768", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM11": ["0x0000000061626364", "0x5152535455565758", "0x0000000000000000", "0x0000000000000000"], | ||
"XMM12": ["0x0000000000000000", "0x0000000000000000", "0x0000000000000000", "0x0000000000000000"] | ||
} | ||
} | ||
%endif | ||
|
||
lea rdx, [rel .data] | ||
|
||
vmovapd xmm0, [rdx] | ||
vmovapd xmm1, [rdx + 16] | ||
|
||
; Simple move Reg<-Reg | ||
vinsertps xmm2, xmm0, xmm1, ((0b00 << 6) | (0b00 << 4) | (0b0000)) | ||
vinsertps xmm3, xmm0, xmm1, ((0b01 << 6) | (0b00 << 4) | (0b0000)) | ||
vinsertps xmm4, xmm0, xmm1, ((0b10 << 6) | (0b01 << 4) | (0b0000)) | ||
vinsertps xmm5, xmm0, xmm1, ((0b11 << 6) | (0b10 << 4) | (0b0000)) | ||
|
||
; Simple move Reg<-Mem | ||
vinsertps xmm6, xmm0, [rdx + 8 * 3], ((0b00 << 6) | (0b11 << 4) | (0b0000)) | ||
vinsertps xmm7, xmm0, [rdx + 8 * 3], ((0b01 << 6) | (0b10 << 4) | (0b0000)) | ||
vinsertps xmm8, xmm0, [rdx + 8 * 3], ((0b10 << 6) | (0b01 << 4) | (0b0000)) | ||
vinsertps xmm9, xmm0, [rdx + 8 * 3], ((0b11 << 6) | (0b00 << 4) | (0b0000)) | ||
|
||
; Simple move Reg<-Reg with mask | ||
vinsertps xmm10, xmm0, xmm1, ((0b00 << 6) | (0b00 << 4) | (0b0010)) | ||
vinsertps xmm11, xmm0, xmm1, ((0b01 << 6) | (0b00 << 4) | (0b0010)) | ||
|
||
; Full ZMask | ||
vinsertps xmm12, xmm0, xmm1, ((0b00 << 6) | (0b00 << 4) | (0b1111)) | ||
|
||
hlt | ||
|
||
align 32 | ||
.data: | ||
dq 0x4142434445464748 | ||
dq 0x5152535455565758 | ||
|
||
dq 0x6162636465666768 | ||
dq 0x7172737475767778 |