Fixed the SS42AI template for the SSE 4.2 instructions with TA prefix so it does
authorKevin Enderby <enderby@apple.com>
Wed, 24 Mar 2010 22:28:42 +0000 (22:28 +0000)
committerKevin Enderby <enderby@apple.com>
Wed, 24 Mar 2010 22:28:42 +0000 (22:28 +0000)
not get an "Unknown immediate size" assert failure when used.  All instructions
of this form have an 8-bit immediate.  Also added a test case of an example
instruction that is of this form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99435 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrFormats.td
test/MC/AsmParser/X86/x86_32-encoding.s

index bb81cbf8ac18c326bb6585c35a42a566f00fce54..c06b81b10a19f65941952ce5e4c6e3dd1a9050fe 100644 (file)
@@ -286,7 +286,7 @@ class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
 //   SS42AI = SSE 4.2 instructions with TA prefix
 class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
              list<dag> pattern>
-      : I<o, F, outs, ins, asm, pattern>, TA, Requires<[HasSSE42]>;
+      : Ii8<o, F, outs, ins, asm, pattern>, TA, Requires<[HasSSE42]>;
 
 // X86-64 Instruction templates...
 //
index 2088aa7bd55145efb07281f02cd16794a6dc075f..95f04e24e57c2991f6e6e6f2407f710b9ff0072b 100644 (file)
 // CHECK: crc32l       %ecx, %ecx
 // CHECK:  encoding: [0xf2,0x0f,0x38,0xf1,0xc9]
                 crc32l %ecx,%ecx
+
+// CHECK: pcmpistrm    $125, %xmm1, %xmm2
+// CHECK:  encoding: [0x66,0x0f,0x3a,0x62,0xd1,0x7d]
+                pcmpistrm $125, %xmm1, %xmm2
+
+// CHECK: pcmpistrm    $125, (%edx,%eax,4), %xmm2
+// CHECK:  encoding: [0x66,0x0f,0x3a,0x62,0x14,0x82,0x7d]
+                pcmpistrm $125, (%edx,%eax,4), %xmm2