[llvm-commits] [llvm] r159983 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/Disassembler/X86/simple-tests.txt test/MC/X86/x86_64-avx-encoding.s
Craig Topper
craig.topper at gmail.com
Mon Jul 9 23:38:33 PDT 2012
Author: ctopper
Date: Tue Jul 10 01:38:33 2012
New Revision: 159983
URL: http://llvm.org/viewvc/llvm-project?rev=159983&view=rev
Log:
Reverse assembler/disassembler operand order for gather instructions.
Modified:
llvm/trunk/lib/Target/X86/X86InstrSSE.td
llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt
llvm/trunk/test/MC/X86/x86_64-avx-encoding.s
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=159983&r1=159982&r2=159983&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 10 01:38:33 2012
@@ -8037,51 +8037,26 @@
//===----------------------------------------------------------------------===//
// VGATHER - GATHER Operations
multiclass avx2_gather<bits<8> opc, string OpcodeStr,
- RegisterClass RC256, X86MemOperand memop256,
- Intrinsic IntGather128, Intrinsic IntGather256> {
+ RegisterClass RC256, X86MemOperand memop256> {
def rm : AVX28I<opc, MRMSrcMem, (outs VR128:$dst),
(ins VR128:$src1, v128mem:$src2, VR128:$mask),
!strconcat(OpcodeStr,
- "\t{$src1, $src2, $mask|$mask, $src2, $src1}"),
+ "\t{$mask, $src2, $dst|$dst, $src2, $mask}"),
[]>, VEX_4VOp3;
def Yrm : AVX28I<opc, MRMSrcMem, (outs RC256:$dst),
(ins RC256:$src1, memop256:$src2, RC256:$mask),
!strconcat(OpcodeStr,
- "\t{$src1, $src2, $mask|$mask, $src2, $src1}"),
+ "\t{$mask, $src2, $dst|$dst, $src2, $mask}"),
[]>, VEX_4VOp3, VEX_L;
}
let Constraints = "$src1 = $dst" in {
- defm VGATHERDPD : avx2_gather<0x92, "vgatherdpd",
- VR256, v128mem,
- int_x86_avx2_gather_d_pd,
- int_x86_avx2_gather_d_pd_256>, VEX_W;
- defm VGATHERQPD : avx2_gather<0x93, "vgatherqpd",
- VR256, v256mem,
- int_x86_avx2_gather_q_pd,
- int_x86_avx2_gather_q_pd_256>, VEX_W;
- defm VGATHERDPS : avx2_gather<0x92, "vgatherdps",
- VR256, v256mem,
- int_x86_avx2_gather_d_ps,
- int_x86_avx2_gather_d_ps_256>;
- defm VGATHERQPS : avx2_gather<0x93, "vgatherqps",
- VR128, v256mem,
- int_x86_avx2_gather_q_ps,
- int_x86_avx2_gather_q_ps_256>;
- defm VPGATHERDQ : avx2_gather<0x90, "vpgatherdq",
- VR256, v128mem,
- int_x86_avx2_gather_d_q,
- int_x86_avx2_gather_d_q_256>, VEX_W;
- defm VPGATHERQQ : avx2_gather<0x91, "vpgatherqq",
- VR256, v256mem,
- int_x86_avx2_gather_q_q,
- int_x86_avx2_gather_q_q_256>, VEX_W;
- defm VPGATHERDD : avx2_gather<0x90, "vpgatherdd",
- VR256, v256mem,
- int_x86_avx2_gather_d_d,
- int_x86_avx2_gather_d_d_256>;
- defm VPGATHERQD : avx2_gather<0x91, "vpgatherqd",
- VR128, v256mem,
- int_x86_avx2_gather_q_d,
- int_x86_avx2_gather_q_d_256>;
+ defm VGATHERDPD : avx2_gather<0x92, "vgatherdpd", VR256, v128mem>, VEX_W;
+ defm VGATHERQPD : avx2_gather<0x93, "vgatherqpd", VR256, v256mem>, VEX_W;
+ defm VGATHERDPS : avx2_gather<0x92, "vgatherdps", VR256, v256mem>;
+ defm VGATHERQPS : avx2_gather<0x93, "vgatherqps", VR128, v256mem>;
+ defm VPGATHERDQ : avx2_gather<0x90, "vpgatherdq", VR256, v128mem>, VEX_W;
+ defm VPGATHERQQ : avx2_gather<0x91, "vpgatherqq", VR256, v256mem>, VEX_W;
+ defm VPGATHERDD : avx2_gather<0x90, "vpgatherdd", VR256, v256mem>;
+ defm VPGATHERQD : avx2_gather<0x91, "vpgatherqd", VR128, v256mem>;
}
Modified: llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt?rev=159983&r1=159982&r2=159983&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/simple-tests.txt Tue Jul 10 01:38:33 2012
@@ -726,28 +726,28 @@
0xc4 0xe3 0xe1 0x48 0x40 0x04 0x21
# CHECK: vgatherdpd %xmm0, (%rdi,%xmm1,2), %xmm2
-0xc4 0xe2 0xe9 0x92 0x04 0x4f
+0xc4 0xe2 0xf9 0x92 0x14 0x4f
# CHECK: vgatherdpd %ymm0, (%rdi,%xmm1,2), %ymm2
-0xc4 0xe2 0xed 0x92 0x04 0x4f
+0xc4 0xe2 0xfd 0x92 0x14 0x4f
# CHECK: vgatherqps %xmm8, (%r15,%xmm9,2), %xmm10
-0xc4 0x02 0x29 0x93 0x04 0x4f
+0xc4 0x02 0x39 0x93 0x14 0x4f
# CHECK: vgatherqps %xmm8, (%r15,%ymm9,2), %xmm10
-0xc4 0x02 0x2d 0x93 0x04 0x4f
+0xc4 0x02 0x3d 0x93 0x14 0x4f
# CHECK: vpgatherdq %xmm0, (%rdi,%xmm1,2), %xmm2
-0xc4 0xe2 0xe9 0x90 0x04 0x4f
+0xc4 0xe2 0xf9 0x90 0x14 0x4f
# CHECK: vpgatherdq %ymm0, (%rdi,%xmm1,2), %ymm2
-0xc4 0xe2 0xed 0x90 0x04 0x4f
+0xc4 0xe2 0xfd 0x90 0x14 0x4f
# CHECK: vpgatherqd %xmm8, (%r15,%xmm9,2), %xmm10
-0xc4 0x02 0x29 0x91 0x04 0x4f
+0xc4 0x02 0x39 0x91 0x14 0x4f
# CHECK: vpgatherqd %xmm8, (%r15,%ymm9,2), %xmm10
-0xc4 0x02 0x2d 0x91 0x04 0x4f
+0xc4 0x02 0x3d 0x91 0x14 0x4f
# rdar://8812056 lldb doesn't print the x86 lock prefix when disassembling
# CHECK: lock
Modified: llvm/trunk/test/MC/X86/x86_64-avx-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_64-avx-encoding.s?rev=159983&r1=159982&r2=159983&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86_64-avx-encoding.s (original)
+++ llvm/trunk/test/MC/X86/x86_64-avx-encoding.s Tue Jul 10 01:38:33 2012
@@ -4123,33 +4123,33 @@
vblendvps %ymm1, _foo2(%rip), %ymm0, %ymm0
// CHECK: vgatherdpd %xmm0, (%rdi,%xmm1,2), %xmm2
-// CHECK: encoding: [0xc4,0xe2,0xe9,0x92,0x04,0x4f]
+// CHECK: encoding: [0xc4,0xe2,0xf9,0x92,0x14,0x4f]
vgatherdpd %xmm0, (%rdi,%xmm1,2), %xmm2
// CHECK: vgatherdpd %ymm0, (%rdi,%xmm1,2), %ymm2
-// CHECK: encoding: [0xc4,0xe2,0xed,0x92,0x04,0x4f]
+// CHECK: encoding: [0xc4,0xe2,0xfd,0x92,0x14,0x4f]
vgatherdpd %ymm0, (%rdi,%xmm1,2), %ymm2
// CHECK: vgatherqps %xmm8, (%r15,%xmm9,2), %xmm10
-// CHECK: encoding: [0xc4,0x02,0x29,0x93,0x04,0x4f]
+// CHECK: encoding: [0xc4,0x02,0x39,0x93,0x14,0x4f]
vgatherqps %xmm8, (%r15,%xmm9,2), %xmm10
// CHECK: vgatherqps %xmm8, (%r15,%ymm9,2), %xmm10
-// CHECK: encoding: [0xc4,0x02,0x2d,0x93,0x04,0x4f]
+// CHECK: encoding: [0xc4,0x02,0x3d,0x93,0x14,0x4f]
vgatherqps %xmm8, (%r15,%ymm9,2), %xmm10
// CHECK: vpgatherdq %xmm0, (%rdi,%xmm1,2), %xmm2
-// CHECK: encoding: [0xc4,0xe2,0xe9,0x90,0x04,0x4f]
+// CHECK: encoding: [0xc4,0xe2,0xf9,0x90,0x14,0x4f]
vpgatherdq %xmm0, (%rdi,%xmm1,2), %xmm2
// CHECK: vpgatherdq %ymm0, (%rdi,%xmm1,2), %ymm2
-// CHECK: encoding: [0xc4,0xe2,0xed,0x90,0x04,0x4f]
+// CHECK: encoding: [0xc4,0xe2,0xfd,0x90,0x14,0x4f]
vpgatherdq %ymm0, (%rdi,%xmm1,2), %ymm2
// CHECK: vpgatherqd %xmm8, (%r15,%xmm9,2), %xmm10
-// CHECK: encoding: [0xc4,0x02,0x29,0x91,0x04,0x4f]
+// CHECK: encoding: [0xc4,0x02,0x39,0x91,0x14,0x4f]
vpgatherqd %xmm8, (%r15,%xmm9,2), %xmm10
// CHECK: vpgatherqd %xmm8, (%r15,%ymm9,2), %xmm10
-// CHECK: encoding: [0xc4,0x02,0x2d,0x91,0x04,0x4f]
+// CHECK: encoding: [0xc4,0x02,0x3d,0x91,0x14,0x4f]
vpgatherqd %xmm8, (%r15,%ymm9,2), %xmm10
More information about the llvm-commits
mailing list