static bool
build_apx_evex_prefix (void)
{
- /* To mimic behavior for legacy insns, transform use of DATA16 into its
- embedded-prefix representation. */
- if (i.prefix[DATA_PREFIX] && i.tm.opcode_space == SPACE_EVEXMAP4)
+ /* To mimic behavior for legacy insns, transform use of DATA16 and REX64 into
+ their embedded-prefix representations. */
+ if (i.tm.opcode_space == SPACE_EVEXMAP4)
{
- if (i.tm.opcode_modifier.opcodeprefix)
+ if (i.prefix[DATA_PREFIX])
+ {
+ if (i.tm.opcode_modifier.opcodeprefix)
+ {
+ as_bad (i.tm.opcode_modifier.opcodeprefix == PREFIX_0X66
+ ? _("same type of prefix used twice")
+ : _("conflicting use of `data16' prefix"));
+ return false;
+ }
+ i.tm.opcode_modifier.opcodeprefix = PREFIX_0X66;
+ i.prefix[DATA_PREFIX] = 0;
+ }
+ if (i.prefix[REX_PREFIX] & REX_W)
{
- as_bad (i.tm.opcode_modifier.opcodeprefix == PREFIX_0X66
- ? _("same type of prefix used twice")
- : _("conflicting use of `data16' prefix"));
- return false;
+ if (i.suffix == QWORD_MNEM_SUFFIX)
+ {
+ as_bad (_("same type of prefix used twice"));
+ return false;
+ }
+ i.tm.opcode_modifier.vexw = VEXW1;
+ i.prefix[REX_PREFIX] = 0;
}
- i.tm.opcode_modifier.opcodeprefix = PREFIX_0X66;
- i.prefix[DATA_PREFIX] = 0;
}
build_evex_prefix ();
}
/* Check for explicit REX prefix. */
- if (i.prefix[REX_PREFIX] || i.rex_encoding)
+ if ((i.prefix[REX_PREFIX]
+ && (i.tm.opcode_space != SPACE_EVEXMAP4
+ /* To mimic behavior for legacy insns, permit use of REX64 for promoted
+ legacy instructions. */
+ || i.prefix[REX_PREFIX] != (REX_OPCODE | REX_W)))
+ || i.rex_encoding)
{
as_bad (_("REX prefix invalid with `%s'"), insn_name (&i.tm));
return;
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `bts'
.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `cmp'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `cmp'
.*:[1-9][0-9]*: Warning: .* `crc32'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `dec'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `div'
*[a-f0-9]+: 66 0f ba 30 01 btrw \$0x1,\(%rax\)
*[a-f0-9]+: 66 0f ba 28 01 btsw \$0x1,\(%rax\)
*[a-f0-9]+: 66 ff 10 callw \*\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 83 38 01[ ]+ccmpaw \{dfv=\} \$0x1,\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 81 38 89 00[ ]+ccmpaw \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 81 38 34 12[ ]+ccmpaw \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 81 38 78 56[ ]+ccmpaw \{dfv=\} \$0x5678,\(%rax\)
*[a-f0-9]+: 66 83 38 01 cmpw \$0x1,\(%rax\)
*[a-f0-9]+: 66 81 38 89 00 cmpw \$0x89,\(%rax\)
*[a-f0-9]+: 66 81 38 34 12 cmpw \$0x1234,\(%rax\)
*[a-f0-9]+: 66 a7 cmpsw %es:\(%rdi\),%ds:\(%rsi\)
*[a-f0-9]+: 66 f2 0f 38 f1 00 crc32w \(%rax\),%eax
*[a-f0-9]+: 66 f2 48 0f 38 f1 00 data16 crc32q \(%rax\),%rax
+ *[a-f0-9]+: 62 f4 05 07 f7 00 89 00[ ]+ctestaw \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 f7 00 34 12[ ]+ctestaw \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 05 07 f7 00 78 56[ ]+ctestaw \{dfv=\} \$0x5678,\(%rax\)
*[a-f0-9]+: 66 ff 08 decw \(%rax\)
*[a-f0-9]+: 66 f7 30 divw \(%rax\)
*[a-f0-9]+: 66 d8 00 data16 fadds \(%rax\)
.*:3: Warning: .*shortened.*
.*:47: Info: .*
.*:3: Warning: .*shortened.*
-.*:99: Info: .*
+.*:51: Info: .*
.*:3: Warning: .*shortened.*
-.*:117: Info: .*
+.*:58: Info: .*
.*:3: Warning: .*shortened.*
-.*:146: Info: .*
+.*:106: Info: .*
.*:3: Warning: .*shortened.*
-.*:170: Info: .*
+.*:124: Info: .*
.*:3: Warning: .*shortened.*
-.*:175: Info: .*
+.*:153: Info: .*
.*:3: Warning: .*shortened.*
-.*:179: Info: .*
+.*:177: Info: .*
+.*:3: Warning: .*shortened.*
+.*:182: Info: .*
+.*:3: Warning: .*shortened.*
+.*:186: Info: .*
*[a-f0-9]+: 48 0f ba 30 01 btrq \$0x1,\(%rax\)
*[a-f0-9]+: 48 0f ba 28 01 btsq \$0x1,\(%rax\)
*[a-f0-9]+: 48 ff 10 rex\.W call \*\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 83 38 01[ ]+ccmpaq \{dfv=\} \$0x1,\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 81 38 89 00 00 00[ ]+ccmpaq \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 81 38 34 12 00 00[ ]+ccmpaq \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 81 38 78 56 34 12[ ]+ccmpaq \{dfv=\} \$0x12345678,\(%rax\)
*[a-f0-9]+: 48 83 38 01 cmpq \$0x1,\(%rax\)
*[a-f0-9]+: 48 81 38 89 00 00 00 cmpq \$0x89,\(%rax\)
*[a-f0-9]+: 48 81 38 34 12 00 00 cmpq \$0x1234,\(%rax\)
*[a-f0-9]+: 48 a7 cmpsq %es:\(%rdi\),%ds:\(%rsi\)
*[a-f0-9]+: 48 a7 cmpsq %es:\(%rdi\),%ds:\(%rsi\)
*[a-f0-9]+: f2 48 0f 38 f1 00 crc32q \(%rax\),%rax
+ *[a-f0-9]+: 62 f4 84 07 f7 00 89 00 00 00[ ]+ctestaq \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 f7 00 34 12 00 00[ ]+ctestaq \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 84 07 f7 00 78 56 34 12[ ]+ctestaq \{dfv=\} \$0x12345678,\(%rax\)
*[a-f0-9]+: 48 ff 08 decq \(%rax\)
*[a-f0-9]+: 48 f7 30 divq \(%rax\)
*[a-f0-9]+: 48 d8 00 rex\.W fadds \(%rax\)
*[a-f0-9]+: 0f ba 30 01 btrl \$0x1,\(%rax\)
*[a-f0-9]+: 0f ba 28 01 btsl \$0x1,\(%rax\)
*[a-f0-9]+: ff 10 call \*\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 83 38 01 ccmpal \{dfv=\} \$0x1,\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 81 38 89 00 00 00 ccmpal \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 81 38 34 12 00 00 ccmpal \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 81 38 78 56 34 12 ccmpal \{dfv=\} \$0x12345678,\(%rax\)
*[a-f0-9]+: 83 38 01 cmpl \$0x1,\(%rax\)
*[a-f0-9]+: 81 38 89 00 00 00 cmpl \$0x89,\(%rax\)
*[a-f0-9]+: 81 38 34 12 00 00 cmpl \$0x1234,\(%rax\)
*[a-f0-9]+: a7 cmpsl %es:\(%rdi\),%ds:\(%rsi\)
*[a-f0-9]+: f2 0f 38 f1 00 crc32l \(%rax\),%eax
*[a-f0-9]+: f2 48 0f 38 f1 00 crc32q \(%rax\),%rax
+ *[a-f0-9]+: 62 f4 04 07 f7 00 89 00 00 00 ctestal \{dfv=\} \$0x89,\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 f7 00 34 12 00 00 ctestal \{dfv=\} \$0x1234,\(%rax\)
+ *[a-f0-9]+: 62 f4 04 07 f7 00 78 56 34 12 ctestal \{dfv=\} \$0x12345678,\(%rax\)
*[a-f0-9]+: ff 08 decl \(%rax\)
*[a-f0-9]+: f7 30 divl \(%rax\)
*[a-f0-9]+: d8 00 fadds \(%rax\)
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `bts'
.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ccmpa'
+.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `cmp'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `cmp'
.*:[1-9][0-9]*: Warning: .* `crc32'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
+.*:[1-9][0-9]*: Warning: .* `ctesta'
+.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `dec'
.*:[1-9][0-9]*: Info: .*
.*:[1-9][0-9]*: Warning: .* `div'
pfx btr $1, (%rax)
pfx bts $1, (%rax)
pfx call *(%rax)
+ pfx ccmpa $1, (%rax)
+ pfx ccmpa $0x89, (%rax)
+ pfx ccmpa $0x1234, (%rax)
+ pfx ccmpa $0x12345678, (%rax)
pfx cmp $1, (%rax)
pfx cmp $0x89, (%rax)
pfx cmp $0x1234, (%rax)
pfx cmps %es:(%rdi), (%rsi)
pfx crc32 (%rax), %eax
pfx16 crc32 (%rax), %rax
+ pfx ctesta $0x89, (%rax)
+ pfx ctesta $0x1234, (%rax)
+ pfx ctesta $0x12345678, (%rax)
pfx dec (%rax)
pfx div (%rax)
pfx fadd (%rax)