diff --git a/gas/ChangeLog b/gas/ChangeLog index acb9af32673..ab232785a13 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,14 @@ +2018-09-13 Jan Beulich + + * config/tc-i386.c (dir_encoding_swap): New enumerator. + (parse_insn): Use it. + (match_template): Re-write reversal check. + * testsuite/gas/i386/pseudos.s: Add various move, ALU, and FPU + tests. + * testsuite/gas/i386/x86-64-pseudos.s: Likewise. + * testsuite/gas/i386/pseudos.d, + testsuite/gas/i386/x86-64-pseudos.d: Adjust expectations. + 2018-09-13 Jan Beulich * config/tc-i386.c (parse_insn): Extend comment ahead of pseudo- diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ccae0481309..b3c7334a982 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -376,7 +376,8 @@ struct _i386_insn { dir_encoding_default = 0, dir_encoding_load, - dir_encoding_store + dir_encoding_store, + dir_encoding_swap } dir_encoding; /* Prefer 8bit or 32bit displacement in encoding. */ @@ -4520,7 +4521,7 @@ parse_insn (char *line, char *mnemonic) Check if we should swap operand or force 32bit displacement in encoding. */ if (mnem_p - 2 == dot_p && dot_p[1] == 's') - i.dir_encoding = dir_encoding_store; + i.dir_encoding = dir_encoding_swap; else if (mnem_p - 3 == dot_p && dot_p[1] == 'd' && dot_p[2] == '8') @@ -5700,15 +5701,40 @@ match_template (char mnem_suffix) continue; if (!(size_match & MATCH_STRAIGHT)) goto check_reverse; - /* If we want store form, we reverse direction of operands. */ - if (i.dir_encoding == dir_encoding_store - && t->opcode_modifier.d) - goto check_reverse; + /* Reverse direction of operands if swapping is possible in the first + place (operands need to be symmetric) and + - the load form is requested, and the template is a store form, + - the store form is requested, and the template is a load form, + - the non-default (swapped) form is requested. */ + overlap1 = operand_type_and (operand_types[0], operand_types[1]); + if (t->opcode_modifier.d && i.reg_operands == 2 + && !operand_type_all_zero (&overlap1)) + switch (i.dir_encoding) + { + case dir_encoding_load: + if (operand_type_check (operand_types[i.operands - 1], anymem) + || operand_types[i.operands - 1].bitfield.regmem) + goto check_reverse; + break; + + case dir_encoding_store: + if (!operand_type_check (operand_types[i.operands - 1], anymem) + && !operand_types[i.operands - 1].bitfield.regmem) + goto check_reverse; + break; + + case dir_encoding_swap: + goto check_reverse; + + case dir_encoding_default: + break; + } /* Fall through. */ case 3: /* If we want store form, we skip the current load. */ - if (i.dir_encoding == dir_encoding_store + if ((i.dir_encoding == dir_encoding_store + || i.dir_encoding == dir_encoding_swap) && i.mem_operands == 0 && t->opcode_modifier.load) continue; diff --git a/gas/testsuite/gas/i386/pseudos.d b/gas/testsuite/gas/i386/pseudos.d index fb2dc5bdac8..acaf972557d 100644 --- a/gas/testsuite/gas/i386/pseudos.d +++ b/gas/testsuite/gas/i386/pseudos.d @@ -22,8 +22,231 @@ Disassembly of section .text: +[a-f0-9]+: 62 f1 7c 08 28 50 00 vmovaps 0x0\(%eax\),%xmm2 +[a-f0-9]+: 62 f1 7c 08 28 90 00 00 00 00 vmovaps 0x0\(%eax\),%xmm2 +[a-f0-9]+: 89 c8 mov %ecx,%eax - +[a-f0-9]+: 89 c8 mov %ecx,%eax +[a-f0-9]+: 8b c1 mov %ecx,%eax + +[a-f0-9]+: 89 c8 mov %ecx,%eax + +[a-f0-9]+: 11 c8 adc %ecx,%eax + +[a-f0-9]+: 13 c1 adc %ecx,%eax + +[a-f0-9]+: 11 c8 adc %ecx,%eax + +[a-f0-9]+: 01 c8 add %ecx,%eax + +[a-f0-9]+: 03 c1 add %ecx,%eax + +[a-f0-9]+: 01 c8 add %ecx,%eax + +[a-f0-9]+: 21 c8 and %ecx,%eax + +[a-f0-9]+: 23 c1 and %ecx,%eax + +[a-f0-9]+: 21 c8 and %ecx,%eax + +[a-f0-9]+: 39 c8 cmp %ecx,%eax + +[a-f0-9]+: 3b c1 cmp %ecx,%eax + +[a-f0-9]+: 39 c8 cmp %ecx,%eax + +[a-f0-9]+: 09 c8 or %ecx,%eax + +[a-f0-9]+: 0b c1 or %ecx,%eax + +[a-f0-9]+: 09 c8 or %ecx,%eax + +[a-f0-9]+: 19 c8 sbb %ecx,%eax + +[a-f0-9]+: 1b c1 sbb %ecx,%eax + +[a-f0-9]+: 19 c8 sbb %ecx,%eax + +[a-f0-9]+: 29 c8 sub %ecx,%eax + +[a-f0-9]+: 2b c1 sub %ecx,%eax + +[a-f0-9]+: 29 c8 sub %ecx,%eax + +[a-f0-9]+: 31 c8 xor %ecx,%eax + +[a-f0-9]+: 33 c1 xor %ecx,%eax + +[a-f0-9]+: 31 c8 xor %ecx,%eax + +[a-f0-9]+: a1 78 56 34 12 mov 0x12345678,%eax + +[a-f0-9]+: a3 78 56 34 12 mov %eax,0x12345678 + +[a-f0-9]+: a1 78 56 34 12 mov 0x12345678,%eax + +[a-f0-9]+: a3 78 56 34 12 mov %eax,0x12345678 + +[a-f0-9]+: 89 07 mov %eax,\(%edi\) + +[a-f0-9]+: 8b 07 mov \(%edi\),%eax + +[a-f0-9]+: 89 07 mov %eax,\(%edi\) + +[a-f0-9]+: 8b 07 mov \(%edi\),%eax + +[a-f0-9]+: 8c c7 mov %es,%edi + +[a-f0-9]+: 8e e8 mov %eax,%gs + +[a-f0-9]+: 8c c7 mov %es,%edi + +[a-f0-9]+: 8e e8 mov %eax,%gs + +[a-f0-9]+: 0f 20 c7 mov %cr0,%edi + +[a-f0-9]+: 0f 22 f8 mov %eax,%cr7 + +[a-f0-9]+: 0f 20 c7 mov %cr0,%edi + +[a-f0-9]+: 0f 22 f8 mov %eax,%cr7 + +[a-f0-9]+: 0f 21 c7 mov %db0,%edi + +[a-f0-9]+: 0f 23 f8 mov %eax,%db7 + +[a-f0-9]+: 0f 21 c7 mov %db0,%edi + +[a-f0-9]+: 0f 23 f8 mov %eax,%db7 + +[a-f0-9]+: 11 07 adc %eax,\(%edi\) + +[a-f0-9]+: 13 07 adc \(%edi\),%eax + +[a-f0-9]+: 11 07 adc %eax,\(%edi\) + +[a-f0-9]+: 13 07 adc \(%edi\),%eax + +[a-f0-9]+: 01 07 add %eax,\(%edi\) + +[a-f0-9]+: 03 07 add \(%edi\),%eax + +[a-f0-9]+: 01 07 add %eax,\(%edi\) + +[a-f0-9]+: 03 07 add \(%edi\),%eax + +[a-f0-9]+: 21 07 and %eax,\(%edi\) + +[a-f0-9]+: 23 07 and \(%edi\),%eax + +[a-f0-9]+: 21 07 and %eax,\(%edi\) + +[a-f0-9]+: 23 07 and \(%edi\),%eax + +[a-f0-9]+: 39 07 cmp %eax,\(%edi\) + +[a-f0-9]+: 3b 07 cmp \(%edi\),%eax + +[a-f0-9]+: 39 07 cmp %eax,\(%edi\) + +[a-f0-9]+: 3b 07 cmp \(%edi\),%eax + +[a-f0-9]+: 09 07 or %eax,\(%edi\) + +[a-f0-9]+: 0b 07 or \(%edi\),%eax + +[a-f0-9]+: 09 07 or %eax,\(%edi\) + +[a-f0-9]+: 0b 07 or \(%edi\),%eax + +[a-f0-9]+: 19 07 sbb %eax,\(%edi\) + +[a-f0-9]+: 1b 07 sbb \(%edi\),%eax + +[a-f0-9]+: 19 07 sbb %eax,\(%edi\) + +[a-f0-9]+: 1b 07 sbb \(%edi\),%eax + +[a-f0-9]+: 29 07 sub %eax,\(%edi\) + +[a-f0-9]+: 2b 07 sub \(%edi\),%eax + +[a-f0-9]+: 29 07 sub %eax,\(%edi\) + +[a-f0-9]+: 2b 07 sub \(%edi\),%eax + +[a-f0-9]+: 31 07 xor %eax,\(%edi\) + +[a-f0-9]+: 33 07 xor \(%edi\),%eax + +[a-f0-9]+: 31 07 xor %eax,\(%edi\) + +[a-f0-9]+: 33 07 xor \(%edi\),%eax + +[a-f0-9]+: d8 c0 fadd %st\(0\),%st + +[a-f0-9]+: d8 c0 fadd %st\(0\),%st + +[a-f0-9]+: dc c0 fadd %st,%st\(0\) + +[a-f0-9]+: d8 f0 fdiv %st\(0\),%st + +[a-f0-9]+: d8 f0 fdiv %st\(0\),%st + +[a-f0-9]+: dc f0 fdiv %st,%st\(0\) + +[a-f0-9]+: d8 f8 fdivr %st\(0\),%st + +[a-f0-9]+: d8 f8 fdivr %st\(0\),%st + +[a-f0-9]+: dc f8 fdivr %st,%st\(0\) + +[a-f0-9]+: d8 c8 fmul %st\(0\),%st + +[a-f0-9]+: d8 c8 fmul %st\(0\),%st + +[a-f0-9]+: dc c8 fmul %st,%st\(0\) + +[a-f0-9]+: d8 e0 fsub %st\(0\),%st + +[a-f0-9]+: d8 e0 fsub %st\(0\),%st + +[a-f0-9]+: dc e0 fsub %st,%st\(0\) + +[a-f0-9]+: d8 e8 fsubr %st\(0\),%st + +[a-f0-9]+: d8 e8 fsubr %st\(0\),%st + +[a-f0-9]+: dc e8 fsubr %st,%st\(0\) + +[a-f0-9]+: 0f 6f f8 movq %mm0,%mm7 + +[a-f0-9]+: 0f 6f f8 movq %mm0,%mm7 + +[a-f0-9]+: 0f 7f c7 movq %mm0,%mm7 + +[a-f0-9]+: 0f 28 f8 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 28 f8 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 29 c7 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 10 f8 movups %xmm0,%xmm7 + +[a-f0-9]+: 0f 10 f8 movups %xmm0,%xmm7 + +[a-f0-9]+: 0f 11 c7 movups %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 10 f8 movss %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 10 f8 movss %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 11 c7 movss %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 28 f8 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 28 f8 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 29 c7 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 10 f8 movupd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 10 f8 movupd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 11 c7 movupd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 10 f8 movsd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 10 f8 movsd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 11 c7 movsd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 6f f8 movdqa %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 6f f8 movdqa %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 7f c7 movdqa %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 6f f8 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 6f f8 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7f c7 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7e f8 movq %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7e f8 movq %xmm0,%xmm7 + +[a-f0-9]+: 66 0f d6 c7 movq %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 28 f8 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 28 f8 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 29 c7 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7c 48 28 f8 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 28 f8 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 29 c7 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 0f 28 f8 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 28 f8 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 29 c7 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 48 10 f8 vmovups %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 10 f8 vmovups %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 11 c7 vmovups %zmm0,%zmm7 + +[a-f0-9]+: c5 f8 10 f8 vmovups %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 10 f8 vmovups %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 11 c7 vmovups %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7c 0f 10 f8 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 10 f8 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 11 c7 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f2 10 f8 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f2 10 f8 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f2 11 c7 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: 62 f1 76 0f 10 f8 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 76 0f 10 f8 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 76 0f 11 c7 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 28 f8 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 28 f8 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 29 c7 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 28 f8 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 28 f8 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 29 c7 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 0f 28 f8 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 28 f8 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 29 c7 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 10 f8 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 10 f8 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 11 c7 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 10 f8 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 10 f8 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 11 c7 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 0f 10 f8 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 10 f8 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 11 c7 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f3 10 f8 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f3 10 f8 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f3 11 c7 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: 62 f1 f7 0f 10 f8 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 f7 0f 10 f8 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 f7 0f 11 c7 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 6f f8 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 6f f8 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 7f c7 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 48 6f f8 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 48 6f f8 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 48 7f c7 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 08 6f f8 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 08 6f f8 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 08 7f c7 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 6f f8 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 6f f8 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 7f c7 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 08 6f f8 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 6f f8 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 7f c7 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 6f f8 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 6f f8 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7f c7 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 48 6f f8 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 48 6f f8 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 48 7f c7 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 08 6f f8 vmovdqu8 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 08 6f f8 vmovdqu8 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 48 7f c7 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 6f f8 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 6f f8 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 7f c7 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 08 6f f8 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 ff 08 6f f8 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 ff 08 7f c7 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 48 6f f8 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 48 6f f8 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 48 7f c7 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 08 6f f8 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 08 6f f8 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 08 7f c7 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 48 6f f8 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 48 6f f8 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 48 7f c7 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 08 6f f8 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 6f f8 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7f c7 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 d6 c7 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 d6 c7 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 1a c3 bndmov %bnd3,%bnd0 + +[a-f0-9]+: 66 0f 1a c3 bndmov %bnd3,%bnd0 + +[a-f0-9]+: 66 0f 1b d8 bndmov %bnd3,%bnd0 +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 @@ -50,8 +273,8 @@ Disassembly of section .text: +[a-f0-9]+: 62 f1 7c 08 28 50 00 vmovaps 0x0\(%eax\),%xmm2 +[a-f0-9]+: 62 f1 7c 08 28 90 00 00 00 00 vmovaps 0x0\(%eax\),%xmm2 +[a-f0-9]+: 89 c8 mov %ecx,%eax - +[a-f0-9]+: 89 c8 mov %ecx,%eax +[a-f0-9]+: 8b c1 mov %ecx,%eax + +[a-f0-9]+: 89 c8 mov %ecx,%eax +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%eax\),%xmm2 diff --git a/gas/testsuite/gas/i386/pseudos.s b/gas/testsuite/gas/i386/pseudos.s index 13093351ea5..2f3398053e6 100644 --- a/gas/testsuite/gas/i386/pseudos.s +++ b/gas/testsuite/gas/i386/pseudos.s @@ -16,9 +16,239 @@ _start: {disp32} vmovaps (%eax),%xmm2 {evex} {disp8} vmovaps (%eax),%xmm2 {evex} {disp32} vmovaps (%eax),%xmm2 + mov %ecx, %eax {load} mov %ecx, %eax {store} mov %ecx, %eax + adc %ecx, %eax + {load} adc %ecx, %eax + {store} adc %ecx, %eax + add %ecx, %eax + {load} add %ecx, %eax + {store} add %ecx, %eax + and %ecx, %eax + {load} and %ecx, %eax + {store} and %ecx, %eax + cmp %ecx, %eax + {load} cmp %ecx, %eax + {store} cmp %ecx, %eax + or %ecx, %eax + {load} or %ecx, %eax + {store} or %ecx, %eax + sbb %ecx, %eax + {load} sbb %ecx, %eax + {store} sbb %ecx, %eax + sub %ecx, %eax + {load} sub %ecx, %eax + {store} sub %ecx, %eax + xor %ecx, %eax + {load} xor %ecx, %eax + {store} xor %ecx, %eax + + {load} mov 0x12345678, %eax + {load} mov %eax, 0x12345678 + {store} mov 0x12345678, %eax + {store} mov %eax, 0x12345678 + {load} mov %eax, (%edi) + {load} mov (%edi), %eax + {store} mov %eax, (%edi) + {store} mov (%edi), %eax + {load} mov %es, %edi + {load} mov %eax, %gs + {store} mov %es, %edi + {store} mov %eax, %gs + {load} mov %cr0, %edi + {load} mov %eax, %cr7 + {store} mov %cr0, %edi + {store} mov %eax, %cr7 + {load} mov %dr0, %edi + {load} mov %eax, %dr7 + {store} mov %dr0, %edi + {store} mov %eax, %dr7 + {load} adc %eax, (%edi) + {load} adc (%edi), %eax + {store} adc %eax, (%edi) + {store} adc (%edi), %eax + {load} add %eax, (%edi) + {load} add (%edi), %eax + {store} add %eax, (%edi) + {store} add (%edi), %eax + {load} and %eax, (%edi) + {load} and (%edi), %eax + {store} and %eax, (%edi) + {store} and (%edi), %eax + {load} cmp %eax, (%edi) + {load} cmp (%edi), %eax + {store} cmp %eax, (%edi) + {store} cmp (%edi), %eax + {load} or %eax, (%edi) + {load} or (%edi), %eax + {store} or %eax, (%edi) + {store} or (%edi), %eax + {load} sbb %eax, (%edi) + {load} sbb (%edi), %eax + {store} sbb %eax, (%edi) + {store} sbb (%edi), %eax + {load} sub %eax, (%edi) + {load} sub (%edi), %eax + {store} sub %eax, (%edi) + {store} sub (%edi), %eax + {load} xor %eax, (%edi) + {load} xor (%edi), %eax + {store} xor %eax, (%edi) + {store} xor (%edi), %eax + + fadd %st, %st + {load} fadd %st, %st + {store} fadd %st, %st + fdiv %st, %st + {load} fdiv %st, %st + {store} fdiv %st, %st + fdivr %st, %st + {load} fdivr %st, %st + {store} fdivr %st, %st + fmul %st, %st + {load} fmul %st, %st + {store} fmul %st, %st + fsub %st, %st + {load} fsub %st, %st + {store} fsub %st, %st + fsubr %st, %st + {load} fsubr %st, %st + {store} fsubr %st, %st + + movq %mm0, %mm7 + {load} movq %mm0, %mm7 + {store} movq %mm0, %mm7 + + movaps %xmm0, %xmm7 + {load} movaps %xmm0, %xmm7 + {store} movaps %xmm0, %xmm7 + movups %xmm0, %xmm7 + {load} movups %xmm0, %xmm7 + {store} movups %xmm0, %xmm7 + movss %xmm0, %xmm7 + {load} movss %xmm0, %xmm7 + {store} movss %xmm0, %xmm7 + movapd %xmm0, %xmm7 + {load} movapd %xmm0, %xmm7 + {store} movapd %xmm0, %xmm7 + movupd %xmm0, %xmm7 + {load} movupd %xmm0, %xmm7 + {store} movupd %xmm0, %xmm7 + movsd %xmm0, %xmm7 + {load} movsd %xmm0, %xmm7 + {store} movsd %xmm0, %xmm7 + movdqa %xmm0, %xmm7 + {load} movdqa %xmm0, %xmm7 + {store} movdqa %xmm0, %xmm7 + movdqu %xmm0, %xmm7 + {load} movdqu %xmm0, %xmm7 + {store} movdqu %xmm0, %xmm7 + movq %xmm0, %xmm7 + {load} movq %xmm0, %xmm7 + {store} movq %xmm0, %xmm7 + vmovaps %xmm0, %xmm7 + {load} vmovaps %xmm0, %xmm7 + {store} vmovaps %xmm0, %xmm7 + vmovaps %zmm0, %zmm7 + {load} vmovaps %zmm0, %zmm7 + {store} vmovaps %zmm0, %zmm7 + vmovaps %xmm0, %xmm7{%k7} + {load} vmovaps %xmm0, %xmm7{%k7} + {store} vmovaps %xmm0, %xmm7{%k7} + vmovups %zmm0, %zmm7 + {load} vmovups %zmm0, %zmm7 + {store} vmovups %zmm0, %zmm7 + vmovups %xmm0, %xmm7 + {load} vmovups %xmm0, %xmm7 + {store} vmovups %xmm0, %xmm7 + vmovups %xmm0, %xmm7{%k7} + {load} vmovups %xmm0, %xmm7{%k7} + {store} vmovups %xmm0, %xmm7{%k7} + vmovss %xmm0, %xmm1, %xmm7 + {load} vmovss %xmm0, %xmm1, %xmm7 + {store} vmovss %xmm0, %xmm1, %xmm7 + vmovss %xmm0, %xmm1, %xmm7{%k7} + {load} vmovss %xmm0, %xmm1, %xmm7{%k7} + {store} vmovss %xmm0, %xmm1, %xmm7{%k7} + vmovapd %xmm0, %xmm7 + {load} vmovapd %xmm0, %xmm7 + {store} vmovapd %xmm0, %xmm7 + vmovapd %zmm0, %zmm7 + {load} vmovapd %zmm0, %zmm7 + {store} vmovapd %zmm0, %zmm7 + vmovapd %xmm0, %xmm7{%k7} + {load} vmovapd %xmm0, %xmm7{%k7} + {store} vmovapd %xmm0, %xmm7{%k7} + vmovupd %xmm0, %xmm7 + {load} vmovupd %xmm0, %xmm7 + {store} vmovupd %xmm0, %xmm7 + vmovupd %zmm0, %zmm7 + {load} vmovupd %zmm0, %zmm7 + {store} vmovupd %zmm0, %zmm7 + vmovupd %xmm0, %xmm7{%k7} + {load} vmovupd %xmm0, %xmm7{%k7} + {store} vmovupd %xmm0, %xmm7{%k7} + vmovsd %xmm0, %xmm1, %xmm7 + {load} vmovsd %xmm0, %xmm1, %xmm7 + {store} vmovsd %xmm0, %xmm1, %xmm7 + vmovsd %xmm0, %xmm1, %xmm7{%k7} + {load} vmovsd %xmm0, %xmm1, %xmm7{%k7} + {store} vmovsd %xmm0, %xmm1, %xmm7{%k7} + vmovdqa %xmm0, %xmm7 + {load} vmovdqa %xmm0, %xmm7 + {store} vmovdqa %xmm0, %xmm7 + vmovdqa32 %zmm0, %zmm7 + {load} vmovdqa32 %zmm0, %zmm7 + {store} vmovdqa32 %zmm0, %zmm7 + vmovdqa32 %xmm0, %xmm7 + {load} vmovdqa32 %xmm0, %xmm7 + {store} vmovdqa32 %xmm0, %xmm7 + vmovdqa64 %zmm0, %zmm7 + {load} vmovdqa64 %zmm0, %zmm7 + {store} vmovdqa64 %zmm0, %zmm7 + vmovdqa64 %xmm0, %xmm7 + {load} vmovdqa64 %xmm0, %xmm7 + {store} vmovdqa64 %xmm0, %xmm7 + vmovdqu %xmm0, %xmm7 + {load} vmovdqu %xmm0, %xmm7 + {store} vmovdqu %xmm0, %xmm7 + vmovdqu8 %zmm0, %zmm7 + {load} vmovdqu8 %zmm0, %zmm7 + {store} vmovdqu8 %zmm0, %zmm7 + vmovdqu8 %xmm0, %xmm7 + {load} vmovdqu8 %xmm0, %xmm7 + {store} vmovdqu8 %zmm0, %zmm7 + vmovdqu16 %zmm0, %zmm7 + {load} vmovdqu16 %zmm0, %zmm7 + {store} vmovdqu16 %zmm0, %zmm7 + vmovdqu16 %xmm0, %xmm7 + {load} vmovdqu16 %xmm0, %xmm7 + {store} vmovdqu16 %xmm0, %xmm7 + vmovdqu32 %zmm0, %zmm7 + {load} vmovdqu32 %zmm0, %zmm7 + {store} vmovdqu32 %zmm0, %zmm7 + vmovdqu32 %xmm0, %xmm7 + {load} vmovdqu32 %xmm0, %xmm7 + {store} vmovdqu32 %xmm0, %xmm7 + vmovdqu64 %zmm0, %zmm7 + {load} vmovdqu64 %zmm0, %zmm7 + {store} vmovdqu64 %zmm0, %zmm7 + vmovdqu64 %xmm0, %xmm7 + {load} vmovdqu64 %xmm0, %xmm7 + {store} vmovdqu64 %xmm0, %xmm7 + vmovq %xmm0, %xmm7 + {load} vmovq %xmm0, %xmm7 + {store} vmovq %xmm0, %xmm7 + {evex} vmovq %xmm0, %xmm7 + {load} {evex} vmovq %xmm0, %xmm7 + {store} {evex} vmovq %xmm0, %xmm7 + + bndmov %bnd3, %bnd0 + {load} bndmov %bnd3, %bnd0 + {store} bndmov %bnd3, %bnd0 + movaps (%eax),%xmm2 {load} movaps (%eax),%xmm2 {store} movaps (%eax),%xmm2 diff --git a/gas/testsuite/gas/i386/x86-64-pseudos.d b/gas/testsuite/gas/i386/x86-64-pseudos.d index de8c8eb46c7..064ece4adfa 100644 --- a/gas/testsuite/gas/i386/x86-64-pseudos.d +++ b/gas/testsuite/gas/i386/x86-64-pseudos.d @@ -22,8 +22,239 @@ Disassembly of section .text: +[a-f0-9]+: 62 f1 7c 08 28 50 00 vmovaps 0x0\(%rax\),%xmm2 +[a-f0-9]+: 62 f1 7c 08 28 90 00 00 00 00 vmovaps 0x0\(%rax\),%xmm2 +[a-f0-9]+: 48 89 c8 mov %rcx,%rax - +[a-f0-9]+: 48 89 c8 mov %rcx,%rax +[a-f0-9]+: 48 8b c1 mov %rcx,%rax + +[a-f0-9]+: 48 89 c8 mov %rcx,%rax + +[a-f0-9]+: 11 c8 adc %ecx,%eax + +[a-f0-9]+: 13 c1 adc %ecx,%eax + +[a-f0-9]+: 11 c8 adc %ecx,%eax + +[a-f0-9]+: 01 c8 add %ecx,%eax + +[a-f0-9]+: 03 c1 add %ecx,%eax + +[a-f0-9]+: 01 c8 add %ecx,%eax + +[a-f0-9]+: 21 c8 and %ecx,%eax + +[a-f0-9]+: 23 c1 and %ecx,%eax + +[a-f0-9]+: 21 c8 and %ecx,%eax + +[a-f0-9]+: 39 c8 cmp %ecx,%eax + +[a-f0-9]+: 3b c1 cmp %ecx,%eax + +[a-f0-9]+: 39 c8 cmp %ecx,%eax + +[a-f0-9]+: 09 c8 or %ecx,%eax + +[a-f0-9]+: 0b c1 or %ecx,%eax + +[a-f0-9]+: 09 c8 or %ecx,%eax + +[a-f0-9]+: 19 c8 sbb %ecx,%eax + +[a-f0-9]+: 1b c1 sbb %ecx,%eax + +[a-f0-9]+: 19 c8 sbb %ecx,%eax + +[a-f0-9]+: 29 c8 sub %ecx,%eax + +[a-f0-9]+: 2b c1 sub %ecx,%eax + +[a-f0-9]+: 29 c8 sub %ecx,%eax + +[a-f0-9]+: 31 c8 xor %ecx,%eax + +[a-f0-9]+: 33 c1 xor %ecx,%eax + +[a-f0-9]+: 31 c8 xor %ecx,%eax + +[a-f0-9]+: 8b 04 25 78 56 34 12 mov 0x12345678,%eax + +[a-f0-9]+: 89 04 25 78 56 34 12 mov %eax,0x12345678 + +[a-f0-9]+: 8b 04 25 78 56 34 12 mov 0x12345678,%eax + +[a-f0-9]+: 89 04 25 78 56 34 12 mov %eax,0x12345678 + +[a-f0-9]+: a1 f0 de bc 9a 78 56 34 12 movabs 0x123456789abcdef0,%eax + +[a-f0-9]+: a3 f0 de bc 9a 78 56 34 12 movabs %eax,0x123456789abcdef0 + +[a-f0-9]+: a1 f0 de bc 9a 78 56 34 12 movabs 0x123456789abcdef0,%eax + +[a-f0-9]+: a3 f0 de bc 9a 78 56 34 12 movabs %eax,0x123456789abcdef0 + +[a-f0-9]+: a1 f0 de bc 9a 78 56 34 12 movabs 0x123456789abcdef0,%eax + +[a-f0-9]+: a3 f0 de bc 9a 78 56 34 12 movabs %eax,0x123456789abcdef0 + +[a-f0-9]+: a1 f0 de bc 9a 78 56 34 12 movabs 0x123456789abcdef0,%eax + +[a-f0-9]+: a3 f0 de bc 9a 78 56 34 12 movabs %eax,0x123456789abcdef0 + +[a-f0-9]+: 89 07 mov %eax,\(%rdi\) + +[a-f0-9]+: 8b 07 mov \(%rdi\),%eax + +[a-f0-9]+: 89 07 mov %eax,\(%rdi\) + +[a-f0-9]+: 8b 07 mov \(%rdi\),%eax + +[a-f0-9]+: 8c c7 mov %es,%edi + +[a-f0-9]+: 8e e8 mov %eax,%gs + +[a-f0-9]+: 8c c7 mov %es,%edi + +[a-f0-9]+: 8e e8 mov %eax,%gs + +[a-f0-9]+: 0f 20 c7 mov %cr0,%rdi + +[a-f0-9]+: 0f 22 f8 mov %rax,%cr7 + +[a-f0-9]+: 0f 20 c7 mov %cr0,%rdi + +[a-f0-9]+: 0f 22 f8 mov %rax,%cr7 + +[a-f0-9]+: 0f 21 c7 mov %db0,%rdi + +[a-f0-9]+: 0f 23 f8 mov %rax,%db7 + +[a-f0-9]+: 0f 21 c7 mov %db0,%rdi + +[a-f0-9]+: 0f 23 f8 mov %rax,%db7 + +[a-f0-9]+: 11 07 adc %eax,\(%rdi\) + +[a-f0-9]+: 13 07 adc \(%rdi\),%eax + +[a-f0-9]+: 11 07 adc %eax,\(%rdi\) + +[a-f0-9]+: 13 07 adc \(%rdi\),%eax + +[a-f0-9]+: 01 07 add %eax,\(%rdi\) + +[a-f0-9]+: 03 07 add \(%rdi\),%eax + +[a-f0-9]+: 01 07 add %eax,\(%rdi\) + +[a-f0-9]+: 03 07 add \(%rdi\),%eax + +[a-f0-9]+: 21 07 and %eax,\(%rdi\) + +[a-f0-9]+: 23 07 and \(%rdi\),%eax + +[a-f0-9]+: 21 07 and %eax,\(%rdi\) + +[a-f0-9]+: 23 07 and \(%rdi\),%eax + +[a-f0-9]+: 39 07 cmp %eax,\(%rdi\) + +[a-f0-9]+: 3b 07 cmp \(%rdi\),%eax + +[a-f0-9]+: 39 07 cmp %eax,\(%rdi\) + +[a-f0-9]+: 3b 07 cmp \(%rdi\),%eax + +[a-f0-9]+: 09 07 or %eax,\(%rdi\) + +[a-f0-9]+: 0b 07 or \(%rdi\),%eax + +[a-f0-9]+: 09 07 or %eax,\(%rdi\) + +[a-f0-9]+: 0b 07 or \(%rdi\),%eax + +[a-f0-9]+: 19 07 sbb %eax,\(%rdi\) + +[a-f0-9]+: 1b 07 sbb \(%rdi\),%eax + +[a-f0-9]+: 19 07 sbb %eax,\(%rdi\) + +[a-f0-9]+: 1b 07 sbb \(%rdi\),%eax + +[a-f0-9]+: 29 07 sub %eax,\(%rdi\) + +[a-f0-9]+: 2b 07 sub \(%rdi\),%eax + +[a-f0-9]+: 29 07 sub %eax,\(%rdi\) + +[a-f0-9]+: 2b 07 sub \(%rdi\),%eax + +[a-f0-9]+: 31 07 xor %eax,\(%rdi\) + +[a-f0-9]+: 33 07 xor \(%rdi\),%eax + +[a-f0-9]+: 31 07 xor %eax,\(%rdi\) + +[a-f0-9]+: 33 07 xor \(%rdi\),%eax + +[a-f0-9]+: d8 c0 fadd %st\(0\),%st + +[a-f0-9]+: d8 c0 fadd %st\(0\),%st + +[a-f0-9]+: dc c0 fadd %st,%st\(0\) + +[a-f0-9]+: d8 f0 fdiv %st\(0\),%st + +[a-f0-9]+: d8 f0 fdiv %st\(0\),%st + +[a-f0-9]+: dc f0 fdiv %st,%st\(0\) + +[a-f0-9]+: d8 f8 fdivr %st\(0\),%st + +[a-f0-9]+: d8 f8 fdivr %st\(0\),%st + +[a-f0-9]+: dc f8 fdivr %st,%st\(0\) + +[a-f0-9]+: d8 c8 fmul %st\(0\),%st + +[a-f0-9]+: d8 c8 fmul %st\(0\),%st + +[a-f0-9]+: dc c8 fmul %st,%st\(0\) + +[a-f0-9]+: d8 e0 fsub %st\(0\),%st + +[a-f0-9]+: d8 e0 fsub %st\(0\),%st + +[a-f0-9]+: dc e0 fsub %st,%st\(0\) + +[a-f0-9]+: d8 e8 fsubr %st\(0\),%st + +[a-f0-9]+: d8 e8 fsubr %st\(0\),%st + +[a-f0-9]+: dc e8 fsubr %st,%st\(0\) + +[a-f0-9]+: 0f 6f f8 movq %mm0,%mm7 + +[a-f0-9]+: 0f 6f f8 movq %mm0,%mm7 + +[a-f0-9]+: 0f 7f c7 movq %mm0,%mm7 + +[a-f0-9]+: 0f 28 f8 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 28 f8 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 29 c7 movaps %xmm0,%xmm7 + +[a-f0-9]+: 0f 10 f8 movups %xmm0,%xmm7 + +[a-f0-9]+: 0f 10 f8 movups %xmm0,%xmm7 + +[a-f0-9]+: 0f 11 c7 movups %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 10 f8 movss %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 10 f8 movss %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 11 c7 movss %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 28 f8 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 28 f8 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 29 c7 movapd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 10 f8 movupd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 10 f8 movupd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 11 c7 movupd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 10 f8 movsd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 10 f8 movsd %xmm0,%xmm7 + +[a-f0-9]+: f2 0f 11 c7 movsd %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 6f f8 movdqa %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 6f f8 movdqa %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 7f c7 movdqa %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 6f f8 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 6f f8 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7f c7 movdqu %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7e f8 movq %xmm0,%xmm7 + +[a-f0-9]+: f3 0f 7e f8 movq %xmm0,%xmm7 + +[a-f0-9]+: 66 0f d6 c7 movq %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 28 f8 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 28 f8 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 29 c7 vmovaps %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7c 48 28 f8 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 28 f8 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 29 c7 vmovaps %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 0f 28 f8 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 28 f8 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 29 c7 vmovaps %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 48 10 f8 vmovups %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 10 f8 vmovups %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7c 48 11 c7 vmovups %zmm0,%zmm7 + +[a-f0-9]+: c5 f8 10 f8 vmovups %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 10 f8 vmovups %xmm0,%xmm7 + +[a-f0-9]+: c5 f8 11 c7 vmovups %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7c 0f 10 f8 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 10 f8 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 7c 0f 11 c7 vmovups %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f2 10 f8 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f2 10 f8 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f2 11 c7 vmovss %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: 62 f1 76 0f 10 f8 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 76 0f 10 f8 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 76 0f 11 c7 vmovss %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 28 f8 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 28 f8 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 29 c7 vmovapd %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 28 f8 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 28 f8 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 29 c7 vmovapd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 0f 28 f8 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 28 f8 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 29 c7 vmovapd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 10 f8 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 10 f8 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 11 c7 vmovupd %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 10 f8 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 10 f8 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 11 c7 vmovupd %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 0f 10 f8 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 10 f8 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 fd 0f 11 c7 vmovupd %xmm0,%xmm7\{%k7\} + +[a-f0-9]+: c5 f3 10 f8 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f3 10 f8 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: c5 f3 11 c7 vmovsd %xmm0,%xmm1,%xmm7 + +[a-f0-9]+: 62 f1 f7 0f 10 f8 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 f7 0f 10 f8 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: 62 f1 f7 0f 11 c7 vmovsd %xmm0,%xmm1,%xmm7\{%k7\} + +[a-f0-9]+: c5 f9 6f f8 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 6f f8 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 7f c7 vmovdqa %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 48 6f f8 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 48 6f f8 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 48 7f c7 vmovdqa32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7d 08 6f f8 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 08 6f f8 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7d 08 7f c7 vmovdqa32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 48 6f f8 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 6f f8 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 48 7f c7 vmovdqa64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fd 08 6f f8 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 6f f8 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 7f c7 vmovdqa64 %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 6f f8 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 6f f8 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7f c7 vmovdqu %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 48 6f f8 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 48 6f f8 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 48 7f c7 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7f 08 6f f8 vmovdqu8 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 08 6f f8 vmovdqu8 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7f 48 7f c7 vmovdqu8 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 6f f8 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 6f f8 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 48 7f c7 vmovdqu16 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 ff 08 6f f8 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 ff 08 6f f8 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 ff 08 7f c7 vmovdqu16 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 48 6f f8 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 48 6f f8 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 48 7f c7 vmovdqu32 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 7e 08 6f f8 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 08 6f f8 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 7e 08 7f c7 vmovdqu32 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 48 6f f8 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 48 6f f8 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 48 7f c7 vmovdqu64 %zmm0,%zmm7 + +[a-f0-9]+: 62 f1 fe 08 6f f8 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 6f f8 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7f c7 vmovdqu64 %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: c5 fa 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: c5 f9 d6 c7 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fe 08 7e f8 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 62 f1 fd 08 d6 c7 vmovq %xmm0,%xmm7 + +[a-f0-9]+: 66 0f 1a c3 bndmov %bnd3,%bnd0 + +[a-f0-9]+: 66 0f 1a c3 bndmov %bnd3,%bnd0 + +[a-f0-9]+: 66 0f 1b d8 bndmov %bnd3,%bnd0 +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 @@ -63,8 +294,8 @@ Disassembly of section .text: +[a-f0-9]+: 62 f1 7c 08 28 50 00 vmovaps 0x0\(%rax\),%xmm2 +[a-f0-9]+: 62 f1 7c 08 28 90 00 00 00 00 vmovaps 0x0\(%rax\),%xmm2 +[a-f0-9]+: 48 89 c8 mov %rcx,%rax - +[a-f0-9]+: 48 89 c8 mov %rcx,%rax +[a-f0-9]+: 48 8b c1 mov %rcx,%rax + +[a-f0-9]+: 48 89 c8 mov %rcx,%rax +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 +[a-f0-9]+: 0f 28 10 movaps \(%rax\),%xmm2 diff --git a/gas/testsuite/gas/i386/x86-64-pseudos.s b/gas/testsuite/gas/i386/x86-64-pseudos.s index c2137698ad3..cbd00966451 100644 --- a/gas/testsuite/gas/i386/x86-64-pseudos.s +++ b/gas/testsuite/gas/i386/x86-64-pseudos.s @@ -16,9 +16,247 @@ _start: {disp32} vmovaps (%rax),%xmm2 {evex} {disp8} vmovaps (%rax),%xmm2 {evex} {disp32} vmovaps (%rax),%xmm2 + mov %rcx, %rax {load} mov %rcx, %rax {store} mov %rcx, %rax + adc %ecx, %eax + {load} adc %ecx, %eax + {store} adc %ecx, %eax + add %ecx, %eax + {load} add %ecx, %eax + {store} add %ecx, %eax + and %ecx, %eax + {load} and %ecx, %eax + {store} and %ecx, %eax + cmp %ecx, %eax + {load} cmp %ecx, %eax + {store} cmp %ecx, %eax + or %ecx, %eax + {load} or %ecx, %eax + {store} or %ecx, %eax + sbb %ecx, %eax + {load} sbb %ecx, %eax + {store} sbb %ecx, %eax + sub %ecx, %eax + {load} sub %ecx, %eax + {store} sub %ecx, %eax + xor %ecx, %eax + {load} xor %ecx, %eax + {store} xor %ecx, %eax + + {load} mov 0x12345678, %eax + {load} mov %eax, 0x12345678 + {store} mov 0x12345678, %eax + {store} mov %eax, 0x12345678 + {load} mov 0x123456789abcdef0, %eax + {load} mov %eax, 0x123456789abcdef0 + {store} mov 0x123456789abcdef0, %eax + {store} mov %eax, 0x123456789abcdef0 + {load} movabs 0x123456789abcdef0, %eax + {load} movabs %eax, 0x123456789abcdef0 + {store} movabs 0x123456789abcdef0, %eax + {store} movabs %eax, 0x123456789abcdef0 + {load} mov %eax, (%rdi) + {load} mov (%rdi), %eax + {store} mov %eax, (%rdi) + {store} mov (%rdi), %eax + {load} mov %es, %edi + {load} mov %eax, %gs + {store} mov %es, %edi + {store} mov %eax, %gs + {load} mov %cr0, %rdi + {load} mov %rax, %cr7 + {store} mov %cr0, %rdi + {store} mov %rax, %cr7 + {load} mov %dr0, %rdi + {load} mov %rax, %dr7 + {store} mov %dr0, %rdi + {store} mov %rax, %dr7 + {load} adc %eax, (%rdi) + {load} adc (%rdi), %eax + {store} adc %eax, (%rdi) + {store} adc (%rdi), %eax + {load} add %eax, (%rdi) + {load} add (%rdi), %eax + {store} add %eax, (%rdi) + {store} add (%rdi), %eax + {load} and %eax, (%rdi) + {load} and (%rdi), %eax + {store} and %eax, (%rdi) + {store} and (%rdi), %eax + {load} cmp %eax, (%rdi) + {load} cmp (%rdi), %eax + {store} cmp %eax, (%rdi) + {store} cmp (%rdi), %eax + {load} or %eax, (%rdi) + {load} or (%rdi), %eax + {store} or %eax, (%rdi) + {store} or (%rdi), %eax + {load} sbb %eax, (%rdi) + {load} sbb (%rdi), %eax + {store} sbb %eax, (%rdi) + {store} sbb (%rdi), %eax + {load} sub %eax, (%rdi) + {load} sub (%rdi), %eax + {store} sub %eax, (%rdi) + {store} sub (%rdi), %eax + {load} xor %eax, (%rdi) + {load} xor (%rdi), %eax + {store} xor %eax, (%rdi) + {store} xor (%rdi), %eax + + fadd %st, %st + {load} fadd %st, %st + {store} fadd %st, %st + fdiv %st, %st + {load} fdiv %st, %st + {store} fdiv %st, %st + fdivr %st, %st + {load} fdivr %st, %st + {store} fdivr %st, %st + fmul %st, %st + {load} fmul %st, %st + {store} fmul %st, %st + fsub %st, %st + {load} fsub %st, %st + {store} fsub %st, %st + fsubr %st, %st + {load} fsubr %st, %st + {store} fsubr %st, %st + + movq %mm0, %mm7 + {load} movq %mm0, %mm7 + {store} movq %mm0, %mm7 + + movaps %xmm0, %xmm7 + {load} movaps %xmm0, %xmm7 + {store} movaps %xmm0, %xmm7 + movups %xmm0, %xmm7 + {load} movups %xmm0, %xmm7 + {store} movups %xmm0, %xmm7 + movss %xmm0, %xmm7 + {load} movss %xmm0, %xmm7 + {store} movss %xmm0, %xmm7 + movapd %xmm0, %xmm7 + {load} movapd %xmm0, %xmm7 + {store} movapd %xmm0, %xmm7 + movupd %xmm0, %xmm7 + {load} movupd %xmm0, %xmm7 + {store} movupd %xmm0, %xmm7 + movsd %xmm0, %xmm7 + {load} movsd %xmm0, %xmm7 + {store} movsd %xmm0, %xmm7 + movdqa %xmm0, %xmm7 + {load} movdqa %xmm0, %xmm7 + {store} movdqa %xmm0, %xmm7 + movdqu %xmm0, %xmm7 + {load} movdqu %xmm0, %xmm7 + {store} movdqu %xmm0, %xmm7 + movq %xmm0, %xmm7 + {load} movq %xmm0, %xmm7 + {store} movq %xmm0, %xmm7 + vmovaps %xmm0, %xmm7 + {load} vmovaps %xmm0, %xmm7 + {store} vmovaps %xmm0, %xmm7 + vmovaps %zmm0, %zmm7 + {load} vmovaps %zmm0, %zmm7 + {store} vmovaps %zmm0, %zmm7 + vmovaps %xmm0, %xmm7{%k7} + {load} vmovaps %xmm0, %xmm7{%k7} + {store} vmovaps %xmm0, %xmm7{%k7} + vmovups %zmm0, %zmm7 + {load} vmovups %zmm0, %zmm7 + {store} vmovups %zmm0, %zmm7 + vmovups %xmm0, %xmm7 + {load} vmovups %xmm0, %xmm7 + {store} vmovups %xmm0, %xmm7 + vmovups %xmm0, %xmm7{%k7} + {load} vmovups %xmm0, %xmm7{%k7} + {store} vmovups %xmm0, %xmm7{%k7} + vmovss %xmm0, %xmm1, %xmm7 + {load} vmovss %xmm0, %xmm1, %xmm7 + {store} vmovss %xmm0, %xmm1, %xmm7 + vmovss %xmm0, %xmm1, %xmm7{%k7} + {load} vmovss %xmm0, %xmm1, %xmm7{%k7} + {store} vmovss %xmm0, %xmm1, %xmm7{%k7} + vmovapd %xmm0, %xmm7 + {load} vmovapd %xmm0, %xmm7 + {store} vmovapd %xmm0, %xmm7 + vmovapd %zmm0, %zmm7 + {load} vmovapd %zmm0, %zmm7 + {store} vmovapd %zmm0, %zmm7 + vmovapd %xmm0, %xmm7{%k7} + {load} vmovapd %xmm0, %xmm7{%k7} + {store} vmovapd %xmm0, %xmm7{%k7} + vmovupd %xmm0, %xmm7 + {load} vmovupd %xmm0, %xmm7 + {store} vmovupd %xmm0, %xmm7 + vmovupd %zmm0, %zmm7 + {load} vmovupd %zmm0, %zmm7 + {store} vmovupd %zmm0, %zmm7 + vmovupd %xmm0, %xmm7{%k7} + {load} vmovupd %xmm0, %xmm7{%k7} + {store} vmovupd %xmm0, %xmm7{%k7} + vmovsd %xmm0, %xmm1, %xmm7 + {load} vmovsd %xmm0, %xmm1, %xmm7 + {store} vmovsd %xmm0, %xmm1, %xmm7 + vmovsd %xmm0, %xmm1, %xmm7{%k7} + {load} vmovsd %xmm0, %xmm1, %xmm7{%k7} + {store} vmovsd %xmm0, %xmm1, %xmm7{%k7} + vmovdqa %xmm0, %xmm7 + {load} vmovdqa %xmm0, %xmm7 + {store} vmovdqa %xmm0, %xmm7 + vmovdqa32 %zmm0, %zmm7 + {load} vmovdqa32 %zmm0, %zmm7 + {store} vmovdqa32 %zmm0, %zmm7 + vmovdqa32 %xmm0, %xmm7 + {load} vmovdqa32 %xmm0, %xmm7 + {store} vmovdqa32 %xmm0, %xmm7 + vmovdqa64 %zmm0, %zmm7 + {load} vmovdqa64 %zmm0, %zmm7 + {store} vmovdqa64 %zmm0, %zmm7 + vmovdqa64 %xmm0, %xmm7 + {load} vmovdqa64 %xmm0, %xmm7 + {store} vmovdqa64 %xmm0, %xmm7 + vmovdqu %xmm0, %xmm7 + {load} vmovdqu %xmm0, %xmm7 + {store} vmovdqu %xmm0, %xmm7 + vmovdqu8 %zmm0, %zmm7 + {load} vmovdqu8 %zmm0, %zmm7 + {store} vmovdqu8 %zmm0, %zmm7 + vmovdqu8 %xmm0, %xmm7 + {load} vmovdqu8 %xmm0, %xmm7 + {store} vmovdqu8 %zmm0, %zmm7 + vmovdqu16 %zmm0, %zmm7 + {load} vmovdqu16 %zmm0, %zmm7 + {store} vmovdqu16 %zmm0, %zmm7 + vmovdqu16 %xmm0, %xmm7 + {load} vmovdqu16 %xmm0, %xmm7 + {store} vmovdqu16 %xmm0, %xmm7 + vmovdqu32 %zmm0, %zmm7 + {load} vmovdqu32 %zmm0, %zmm7 + {store} vmovdqu32 %zmm0, %zmm7 + vmovdqu32 %xmm0, %xmm7 + {load} vmovdqu32 %xmm0, %xmm7 + {store} vmovdqu32 %xmm0, %xmm7 + vmovdqu64 %zmm0, %zmm7 + {load} vmovdqu64 %zmm0, %zmm7 + {store} vmovdqu64 %zmm0, %zmm7 + vmovdqu64 %xmm0, %xmm7 + {load} vmovdqu64 %xmm0, %xmm7 + {store} vmovdqu64 %xmm0, %xmm7 + vmovq %xmm0, %xmm7 + {load} vmovq %xmm0, %xmm7 + {store} vmovq %xmm0, %xmm7 + {evex} vmovq %xmm0, %xmm7 + {load} {evex} vmovq %xmm0, %xmm7 + {store} {evex} vmovq %xmm0, %xmm7 + + bndmov %bnd3, %bnd0 + {load} bndmov %bnd3, %bnd0 + {store} bndmov %bnd3, %bnd0 + movaps (%rax),%xmm2 {load} movaps (%rax),%xmm2 {store} movaps (%rax),%xmm2