mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
[X86] Fix printing of sha256rnds2 to include the implicit %xmm0 argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc54be0676
commit
7fa46d07d9
@ -7479,14 +7479,18 @@ multiclass SHAI_binop<bits<8> Opc, string OpcodeStr, Intrinsic IntId,
|
||||
bit UsesXMM0 = 0> {
|
||||
def rr : I<Opc, MRMSrcReg, (outs VR128:$dst),
|
||||
(ins VR128:$src1, VR128:$src2),
|
||||
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"),
|
||||
!if(UsesXMM0,
|
||||
!strconcat(OpcodeStr, "\t{%xmm0, $src2, $dst|$dst, $src2, xmm0}"),
|
||||
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}")),
|
||||
[!if(UsesXMM0,
|
||||
(set VR128:$dst, (IntId VR128:$src1, VR128:$src2, XMM0)),
|
||||
(set VR128:$dst, (IntId VR128:$src1, VR128:$src2)))]>, T8;
|
||||
|
||||
def rm : I<Opc, MRMSrcMem, (outs VR128:$dst),
|
||||
(ins VR128:$src1, i128mem:$src2),
|
||||
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"),
|
||||
!if(UsesXMM0,
|
||||
!strconcat(OpcodeStr, "\t{%xmm0, $src2, $dst|$dst, $src2, xmm0}"),
|
||||
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}")),
|
||||
[!if(UsesXMM0,
|
||||
(set VR128:$dst, (IntId VR128:$src1,
|
||||
(bc_v4i32 (memopv2i64 addr:$src2)), XMM0)),
|
||||
@ -7521,10 +7525,10 @@ let Constraints = "$src1 = $dst", Predicates = [HasSHA] in {
|
||||
}
|
||||
|
||||
// Aliases with explicit %xmm0
|
||||
def : InstAlias<"sha256rnds2\t{%xmm0, $src2, $dst|$dst, $src2, xmm0}",
|
||||
(SHA256RNDS2rr VR128:$dst, VR128:$src2)>;
|
||||
def : InstAlias<"sha256rnds2\t{%xmm0, $src2, $dst|$dst, $src2, xmm0}",
|
||||
(SHA256RNDS2rm VR128:$dst, i128mem:$src2)>;
|
||||
def : InstAlias<"sha256rnds2\t{$src2, $dst|$dst, $src2}",
|
||||
(SHA256RNDS2rr VR128:$dst, VR128:$src2), 0>;
|
||||
def : InstAlias<"sha256rnds2\t{$src2, $dst|$dst, $src2}",
|
||||
(SHA256RNDS2rm VR128:$dst, i128mem:$src2), 0>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AES-NI Instructions
|
||||
|
@ -86,7 +86,7 @@ entry:
|
||||
; CHECK: test_sha256rnds2rr
|
||||
; CHECK: movaps %xmm0, [[XMM_TMP1:%xmm[1-9][0-9]?]]
|
||||
; CHECK: movaps %xmm2, %xmm0
|
||||
; CHECK: sha256rnds2 %xmm1, [[XMM_TMP1]]
|
||||
; CHECK: sha256rnds2 %xmm0, %xmm1, [[XMM_TMP1]]
|
||||
}
|
||||
|
||||
define <4 x i32> @test_sha256rnds2rm(<4 x i32> %a, <4 x i32>* %b, <4 x i32> %c) nounwind uwtable {
|
||||
@ -97,7 +97,7 @@ entry:
|
||||
; CHECK: test_sha256rnds2rm
|
||||
; CHECK: movaps %xmm0, [[XMM_TMP2:%xmm[1-9][0-9]?]]
|
||||
; CHECK: movaps %xmm1, %xmm0
|
||||
; CHECK: sha256rnds2 (%rdi), [[XMM_TMP2]]
|
||||
; CHECK: sha256rnds2 %xmm0, (%rdi), [[XMM_TMP2]]
|
||||
}
|
||||
|
||||
declare <4 x i32> @llvm.x86.sha256msg1(<4 x i32>, <4 x i32>) nounwind readnone
|
||||
@ -136,4 +136,4 @@ entry:
|
||||
ret <4 x i32> %1
|
||||
; CHECK: test_sha256msg2rm
|
||||
; CHECK: sha256msg2 (%rdi), %xmm0
|
||||
}
|
||||
}
|
||||
|
@ -185,10 +185,10 @@
|
||||
# CHECK: sha1msg2 (%rax), %xmm2
|
||||
0x0f 0x38 0xca 0x10
|
||||
|
||||
# CHECK: sha256rnds2 (%rax), %xmm2
|
||||
# CHECK: sha256rnds2 %xmm0, (%rax), %xmm2
|
||||
0x0f 0x38 0xcb 0x10
|
||||
|
||||
# CHECK: sha256rnds2 %xmm1, %xmm2
|
||||
# CHECK: sha256rnds2 %xmm0, %xmm1, %xmm2
|
||||
0x0f 0x38 0xcb 0xd1
|
||||
|
||||
# CHECK: sha256msg1 %xmm1, %xmm2
|
||||
|
@ -148,19 +148,19 @@ sha1msg2 %xmm1, %xmm2
|
||||
// CHECK: encoding: [0x0f,0x38,0xca,0x10]
|
||||
sha1msg2 (%rax), %xmm2
|
||||
|
||||
// CHECK: sha256rnds2 (%rax), %xmm2
|
||||
// CHECK: sha256rnds2 %xmm0, (%rax), %xmm2
|
||||
// CHECK: encoding: [0x0f,0x38,0xcb,0x10]
|
||||
sha256rnds2 (%rax), %xmm2
|
||||
|
||||
// CHECK: sha256rnds2 %xmm1, %xmm2
|
||||
// CHECK: sha256rnds2 %xmm0, %xmm1, %xmm2
|
||||
// CHECK: encoding: [0x0f,0x38,0xcb,0xd1]
|
||||
sha256rnds2 %xmm1, %xmm2
|
||||
|
||||
// CHECK: sha256rnds2 (%rax), %xmm2
|
||||
// CHECK: sha256rnds2 %xmm0, (%rax), %xmm2
|
||||
// CHECK: encoding: [0x0f,0x38,0xcb,0x10]
|
||||
sha256rnds2 %xmm0, (%rax), %xmm2
|
||||
|
||||
// CHECK: sha256rnds2 %xmm1, %xmm2
|
||||
// CHECK: sha256rnds2 %xmm0, %xmm1, %xmm2
|
||||
// CHECK: encoding: [0x0f,0x38,0xcb,0xd1]
|
||||
sha256rnds2 %xmm0, %xmm1, %xmm2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user